Monday, March 19, 2012

Error on Create Trigger

I have the following

CREATE TRIGGER dbo.tgrCacheCustomers
ON dbo.Customers
FOR INSERT, UPDATE, DELETE
AS
EXEC sp_makewebtask 'C:\DependencyFile.txt','SELECT top 1 CustomerId FROM customers'
and I get the following error that I dont understand:

Error 21037: [SQL-DMO] The name specified in the Text property's 'CREATE ...' statement must match the Name property, and must be followed by valid TSQL statements.

Any ideas someone?Before anyone can help, please kindly explain what you want to accomplish in:
EXEC sp_makewebtask 'C:\DependencyFile.txt','SELECT top 1 CustomerId FROM customers'

Thanks.|||

This error occurs sometimes when you renmae the trigger manually by using F2 Function key & rename. if the name doesent matches with the name specified in the trigger.

Regards
Salman Zafar

No comments:

Post a Comment