Just wondering the best way to tell if a table exists before writing data to it. This would be from an Access front end. Is there a particular stored proc? Or is it a query into one of the system tables?
You could write a SP that returned the count of the number of table objects that matched the table name in question.
Code:
Select Count(Id) From sysObjects
WHERE Name='YourTableName' and xType='U'
I believe the 'U' restricts the count to tables rather than SPs or views, etc. BTW, this is not how you would write the SP. Ask if you need help.
-Karl
[red] Cursors, triggers, user-defined functions and dynamic SQL are an axis of evil![/red]
[green]Life's uncertain...eat dessert first...www.deerfieldbakery.com[/green]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.