I have a very simple stored procedure:
CREATE PROCEDURE [dbo].[copier] AS
INSERT INTO [DISS EMAIL]...(mailto, mailfrom)
SELECT TOP 1 mailto, mailfrom
FROM [EMAIL]
ORDER BY email.id DESC
GO
This is used to simply copy the most recently added record from the "email" table on SQL server 2000 to a linked server table in an access database.
If i run this procedure from query analyser then it works fine. However, I need it to be triggered when an insert occurs on the local SQL email table.
I have tried either calling this procdure from an AFTER trigger or doing an insert from scratch in the trigger but both cause an error: ODBB insert into linked table "email" failed
I have no idea how to solve this. Any ideas?
CREATE PROCEDURE [dbo].[copier] AS
INSERT INTO [DISS EMAIL]...(mailto, mailfrom)
SELECT TOP 1 mailto, mailfrom
FROM [EMAIL]
ORDER BY email.id DESC
GO
This is used to simply copy the most recently added record from the "email" table on SQL server 2000 to a linked server table in an access database.
If i run this procedure from query analyser then it works fine. However, I need it to be triggered when an insert occurs on the local SQL email table.
I have tried either calling this procdure from an AFTER trigger or doing an insert from scratch in the trigger but both cause an error: ODBB insert into linked table "email" failed
I have no idea how to solve this. Any ideas?