January 11, 2008 at 6:31 pm
In SQL 2000, there is a system table called sysobjects that contains table name in a database, which gives us info about a table existed or not. In SQL 2005, the system table is no there anymore. Is there a better way in SQL 2005 to detect table existed, ideally, from C# code?
January 11, 2008 at 6:33 pm
Sorry I accidently post it twice. I tried to delete it but could not.
February 8, 2008 at 10:49 am
sysobjects still exists in SQL2005 as a migration, but is a VIEW
- you can see it in SSMS under system views
not sure if is still [will be] in SQL2008 as MS deprecated its usage
programatically you can use SMO or WMI or plain ADO object models
- or even ADOX if you use ADO (classic)
HTH
February 8, 2008 at 6:12 pm
"New" view, available in 2k5, is called sys.Objects and will likely be available in 2k8, as well.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply