Link Tables using Alter Table command

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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.
 
Back
Top