Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-07-10 : 08:56:15
|
| Adrian Hesketh writes "Hello, I've been working on a project to read in a database from SQLServer and then write some .Net code to create a set of stored procedures and VB.Net / ASP.Net data access methods - I'll then be giving it away and using it on my own projects. The app works fine on my machine and generates all the stored procedures and VB.Net code it needs to, but refuses to work on other peoples servers. I've figured out that the problem lies in the dodgy SQL i've been using to read in all the Database names, which I've then been using the results of to read in all the Tables and ID's for that database, and then using those results (this is where the real problem is) to read in the list of columns for a table and find out which is the primary key...I've been interrogating the SysObjects and SysColumns tables... I need the SQLGuru's help to create a set of queries that will get me the information I need across MS SQLServer 7.0 to 2000 without any weird results.I think that lots of people would be interested in the answer to this question... Certainly I know a lot of people who would love to understand that internal structure of SQLServer a lot more, but just can't find the time.Does this qualify as a hard question?Thanks in advance and for all your other "Stump the Guru" questions!!!Adrian." |
|
|
graz
Chief SQLTeam Crack Dealer
4149 Posts |
Posted - 2002-07-10 : 08:56:15
|
| Look for articles on the information schema views: http://www.sqlteam.com/SearchResults.asp?SearchTerms=information+schema |
 |
|
|
adrianhesketh
Starting Member
1 Post |
Posted - 2002-07-11 : 03:29:17
|
| Cheers for that, article http://www.swynk.com/friends/achigrik/SQL70SP.asp was the most useful (undocumented SQLServer 7 Stored Procedures) - My project is now on its way to completion! I wonder what undocumented StoredProcs there are in SQLServer 2000... |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-07-11 : 08:34:50
|
quote: I wonder what undocumented StoredProcs there are in SQLServer 2000...
Wonder no longer, pick upThe Guru's Guide to SQL Server Stored Procedures, XML and HTMLby Ken Henderson. It lists the undocumented functions, DBCC commands and stored procedures in SQL Server, amongst other superb information and techniques. You can pick it up at the SQL Team Bookstore. |
 |
|
|
|
|
|
|
|