Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. ColinM

    Architechure Question

    Thanks for the replies, This has got me thinking more generally about OOP. In a lot of examples I've seen with lots of layers of abstractions. i.e. DAL, Business Layer, UI Layer. However in "true" OOP wouldn't an Employee class have all these layers embedded inside. Employee.Draw()...
  2. ColinM

    Architechure Question

    Here I have two similar ways of populating a simple Employee class. I'm trying to work out the pros & cons of each method. 1) Seems simpler but tightly-coupled to the DAL(Data Access Layer) 1) [code] class Employee { public int ID; public string Forename; public string Surname; public...
  3. ColinM

    Collection Problem

    Thanks for the reply. I've gone along the lines of what you suggested, and added a LineNo field to the class. The LineNo field is set to equal count, which is a static int which gets incremented in the constructor. This seems to at least work, if slightly untidy.
  4. ColinM

    Collection Problem

    I have a collection which I wish to display in a datagrid. It is a collection of a Name class which has Forename & Surname. This works fine except I would also like to display the indexer of the collection, to give me a line number, in the datagrid like so: 1 John Smith 2 Bob Jones Any ideas...
  5. ColinM

    Stored Procedure Vs. Select Statement

    Stored Procedures are easier to mantain. It keeps all you SQL code in one place, separating out design logic from business/data logic. Also if you have a front-end program (for example a form in VB) then if you need to alter something, like a table name or maybe extend functionality, it is...
  6. ColinM

    A question on Hash Joins.

    Use can use table hints so as: USE pubs SELECT SUBSTRING((RTRIM(a.au_fname) + ' ' + LTRIM(a.au_lname)), 1, 25) AS Name, SUBSTRING(t.title, 1, 20) AS Title FROM authors a INNER MERGE JOIN titleauthor ta ON a.au_id = ta.au_id INNER HASH JOIN titles t ON t.title_id = ta.title_id ORDER...
  7. ColinM

    Allow a page to save a file.

    I think this is cause due to the fact that the "user" ASP.NET doesn't have write permissions. You need to explicity give the ASP.NET account write permissions on your web server
  8. ColinM

    CType Problems

    AAah, I think I see what you mean. Better do some more reading.
  9. ColinM

    CType Problems

    Yeah, that'll do nicely, thanks I've got this now Dim EnteredOn as DateTime = CType(CType(e.Item.Cells(3).Controls(0), TextBox).Text , datetime) Dim Resolved as Boolean = Ctype( CType(e.Item.Cells(4).Controls(1), Checkbox).Checked , boolean) and it works (just about) Although I don't really...
  10. ColinM

    SUPER MAIN

    Sounds like you need a front-end application to select which procedure to run and enter parameters, rather than trying to do everything in SQL. Stored Procedure get their speed advantage from the execution plan, this works best if the stored procedure is simple and concentrates on one job. With...
  11. ColinM

    CType Problems

    Hi, I'm fairly new to ASP.NET to hopefully an easy one to solve :) Whats wrong with this? Dim Resolved as Boolean = CType(e.Item.Cells(4).Controls(0), Checkbox).Checked I'm trying to store the value from a datagrid for an update in a datagrid. It works for text but not for a checkbox...
  12. ColinM

    Probably very simple StorProc Question

    Something like this: select column_name,data_type from information_schema.columns
  13. ColinM

    Is my SQLserver under attack?

    You can use SQL Profiler to track logins & hosts. That should give you the computer name if it is on your network
  14. ColinM

    can you query against results set from a stored procedure?

    Would it be possible to denormalize your table for a better performance? Also do you having indexes on the fields you are joining will obviously help. Perhaps you could index the view?
  15. ColinM

    Query to get rows affected.

    SELECT @@Rowcount Will give you the number of rows affected by the previous statement. It is probably better and safer to immediately store the rowcount in a separate variable. DECLARE @rc INT EXEC (@sql) SET @rc = @@rowcount RETURN @rc
  16. ColinM

    Route output to an excel sheet

    Or even quicker, press Ctrl + D to get grid output and cut & paste results into excel!
  17. ColinM

    Route output to an excel sheet

    Heres a couple more ways. 3. Use DTS to output to Excel 4. In Query Analyzer change Tools..Options..Results to results to file, and comma-delimited. Then you can load this file into Excel. (Quick and simple for one-offs)
  18. ColinM

    Database for a Forum like Tek-Tips?

    1. SQL Server is used. (I just recently got a SQL Server locking error whilst posting!). From the http address I think it is used in conjuction with ColfFusion? (CFM) 2. Work out the column sizes, record size, number of records, size of indexes (can be big!), expected growth/month . This should...
  19. ColinM

    Firewall Alerts

    There has been a sql worm recently which can enter your server if you have a blank SA password.
  20. ColinM

    Help on SQL server 2000

    Try issuing this command exec sp_dboption 'dbname', 'select into/bulkcopy', 'true' replacing dbname with your database name

Part and Inventory Search

Back
Top