Hi anyone 
I have something interesting (annoying) going on with my trigger on SQL2K, I've noticed several threads on this in the past, but no resolution for the posters.
I have a simple insert statement which puts a few fields into a table on a linked server.
This code works fine from SQL query analyzer but fails when run as a trigger.
The error I get is "The operation could not be performed because the OLE DB provider 'MSDASQL' was unable to begin a distributed transaction"
Anybody got any ideas?
Thanks as always!
David
Dave Bennett
I have something interesting (annoying) going on with my trigger on SQL2K, I've noticed several threads on this in the past, but no resolution for the posters.
I have a simple insert statement which puts a few fields into a table on a linked server.
Code:
INSERT OPENQUERY(DBODBC, 'SELECT * FROM STOCK') values ('StockCode', 111, 'Reference')
Code:
CREATE TRIGGER HN_TRAN_STKMOVE
ON STK_MOVEMENTS
AFTER INSERT AS
INSERT OPENQUERY(DBODBC, 'SELECT * FROM STOCK') values ('StockCode', 111, 'Reference')
The error I get is "The operation could not be performed because the OLE DB provider 'MSDASQL' was unable to begin a distributed transaction"
Anybody got any ideas?
Thanks as always!
David
Dave Bennett