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 Chriss Miller 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: *

  • Users: ColinM
  • Content: Threads
  • Order by date
  1. 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...
  2. 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...
  3. 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...
  4. ColinM

    SQL Wizardry Required!

    Hi folks, Bit of a tricky one here, well for me anyway. As an example I'll use the system tables. Query 1 ------- select t.xtype, c.name from systypes t LEFT OUTER JOIN syscolumns c ON t.xtype = c.xtype AND c.name = 'info' ORDER BY t.xtype This query outputs all the types and the name beside...
  5. ColinM

    Simple DB commands

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/daab-rm.asp?frame=true This reduces the complexity of ADO.NET using an Application Block. There is also an application block for easier error handling in the table of contents i.e. DataSet ds =...
  6. ColinM

    Monitor SQL Services on Windows 2000

    Anybody know about how I can be notified if the SQL Server services stop. You can apparently do it in NT Performance Monitor by adding an alert on the process ID of the services and the condition when the value is 0 (stopped). However in W2K the value goes to null rather than 0. Any workarounds?
  7. ColinM

    Input Masks?

    Anybody know how I can approximate an input mask from Access in VB.Net? I wish to enter a date in a text box and have a template like this: __/__/_____ where you simply type in the numbers Is there an easy way to do this?
  8. ColinM

    SQL Quiz

    Heres a quiz on SQL performance & tuning. No cheating! :-) http://www.sql-server-performance.com/quiz_start.asp
  9. ColinM

    How to get domain group?

    How can I get the domain group from a login? i.e. DOMAIN\Group is a NT Group Login DOMAIN\User is a member of this group when DOMAIN\User logs in I want to be able to identify what group they belong to. Is this possible in SQL? Using this: select user_name() as [User], suser_sname() as Login...
  10. ColinM

    Database maintenace tasks

    Hi, I have a database which will not be used at night, so should I run any procedures on it. i.e. DBCC CHECKDB DBCC DBREINDEX (ALL TABLES) Should these be run before or after the backup? Is it possible to be alerted if there is a problem with these commands, if so how?
  11. ColinM

    Strange SQL Query behaviour

    I have the following query: use northwind select left(shipname, (select max(ProductID) from [order details] where OrderID = O.OrderID)) as test FROM Orders O but DO NOT RUN on anything but a test server as it will max out the processing power, and I cant even seem to cancel the query. I have...
  12. ColinM

    Incorrect Design??

    I have the following design: Table1 |----------| |ID | |Text | |----------| Main Table2 |-------| |----------| |Table |...
  13. ColinM

    ORDER BY bug?

    ORDER BY requires the EXACT same text in the first select statement as in the ORDER BY clause. The following query works use pubs select state,(case state when 'TX' then 1 else 2 end) from stores union all select state,(case state when 'TX' then 1 else 2 end) from publishers order by (case...
  14. ColinM

    ORDER BY problem

    Got a query like the following: use pubs select state from publishers union all select state from authors order by (case authors.state when 'UT' then 1 else 2 end),authors.state Which should order states with 'UT' first. It works fine on just the authors table, but when the union is introduced...
  15. ColinM

    SQL Articles

    Some good articles about using the COALESCE function. Dynamic where: http://www.sqlteam.com/item.asp?ItemID=2077 Dynamic order by: http://www.sqlteam.com/item.asp?ItemID=2209 Build comma delimited string: http://www.sqlteam.com/item.asp?ItemID=2368
  16. ColinM

    sysindexes table?

    Hi, Does anyone know how to use the keys column in sysindexes? According to BOL it is: List of the column IDs of the columns that make up the index key. But I don't know how to make sense of this strange varbinary(816) field. I would like the column names that the index uses displayed. Any ideas?
  17. ColinM

    Efficient SQL wanted!!

    I have a table roughly like this: ID RecNo 1 1 2 Null 3 Null 4 1 5 Null 6 2 7 Null 8 2 What I would like to do is change the table to: ID RecNo 1 1 2 1 3 1 4 1 5 Null 6 2 7 2 8 2 i.e. fill in the blanks between similar numbers. Can I do this with one good sql statement...
  18. ColinM

    MSDE experiences??

    Not quite sure whats the most appropriate group to post this question, so I'll try here :-) I would like to know about anybodys experience of using MSDE and deploying apps with it. I have heard that you can't installed MSDE on a computer with SQL Server, is this correct? Can you remotely use...
  19. ColinM

    Single Domain Account for SQL

    Is it advisable to use just one domain account for multiple sql servers? For example three developers sharing the same SQLServerAgent account. It will mainly be used to backup local servers to a network drive.
  20. ColinM

    Unset database password

    I have an access 2000 database, which I have set a database level password. I now wish to remove it, but when I try to remove the password Access says to open the database in exclusive mode, which I already have! The default open mode is exclusive as well. I definitely have the right password as...

Part and Inventory Search

Back
Top