>Hi All:
> How can I check if a table exist and if id does I want to drop that table?
>Thanks
>ZA
Check Books On Line (BOL) and search for SQL-DMO or SQLDMO. I'm assuming here that you've got the Enterprise Manager installed.
If not, and you're using VFP, then look at SQLTABLES() in the VFP help. This will return all the tables or all the non-system tables, depending on the parameters. From there, you can use SQLEXEC() (after, of course, establishing a handle via SQLSTRINGCONNECT() or SQLCONNECT()) to pass a DROP TABLE... string.
Finally, you could use the IF EXISTS...function TSQL to do this.
George
Ubi caritas et amor, deus ibi est