I have two databases, and I have created three triggers for INSERT, DELETE, and UPDATE.
Basically, anytime a record is inserted, deleted, or updated from the database where I have the trigger, the trigger makes this change in another database.
Here is the code for INSERT:
CREATE TRIGGER trg_Test ON tbl_User
FOR INSERT
AS
INSERT INTO DatabaseTwo.dbo.tbl_User
SELECT id, email, password FROM INSERTED
PRINT 'User(s) added.'
The trigger works flawlessly if I go into Query Analyzer and execute a T-SQL statement to insert a new record. However, when I insert a record using the ASP page that will be used to insert new users, I get the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e37'
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'DatabaseTwo.dbo.tbl_User'.
Any ideas?
Basically, anytime a record is inserted, deleted, or updated from the database where I have the trigger, the trigger makes this change in another database.
Here is the code for INSERT:
CREATE TRIGGER trg_Test ON tbl_User
FOR INSERT
AS
INSERT INTO DatabaseTwo.dbo.tbl_User
SELECT id, email, password FROM INSERTED
PRINT 'User(s) added.'
The trigger works flawlessly if I go into Query Analyzer and execute a T-SQL statement to insert a new record. However, when I insert a record using the ASP page that will be used to insert new users, I get the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e37'
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'DatabaseTwo.dbo.tbl_User'.
Any ideas?