deleteting a table in SQL server

T

thriveni

I use access2000.
I have a DSN established to SQL server. I have a table in
SQL server that is not and should be linked in access.
However I want to delete this table if it exists. How can
I do through VBA/DAO ?
any help would be appreciated.
 
C

Chris Nebinger

Do you want to delete the table in SQL Server, or just the
link?

If you want to delete it, just issue the following SQL
Statement:

Drop Table TableName


If you want to delete the link:
On Error Resume Next
DoCmd.DeleteObject acTable,"TableName"


Chris Nebinger
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top