Link Tables using Alter Table command

G

Guest

Hello,
SQL Server 2000 (8.00.2039[SP4])
Access 2003 SP2
I have a database that is SQL Server.
In Access I have linked tables from the SQL Server.
I now want to run code in Access on table.
When I do I find I have to disable all of the triggers.
I have been doing this manually but would like to add to my code.
Here is the command that I am trying to run:

Dim dbs As Database
Set dbs = CurrentDb()
dbs.Connection.Execute "ALTER TABLE WIRE DISABLE TRIGGER ALL"

But it is giving me an error saying Operation is not supported for this type
of object.
Does anyone know how to do this?
Thanks,
K
 
D

Douglas J. Steele

The triggers exist on the server, not in Access. CurrentDb is a reference to
the Jet database, not to the linked database.

Try creating a pass-through query that runs on the server.
 

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