I m using ASP.NET 2005 with C# and SQL SERVER 2005.
I m using stored procedure and sql datasource control to retrieve the data.
I want to use the trigger alongwith storedprocedure.
I have created the following trigger on emp_table.
CREATE TRIGGER Employeee on emp_tableWhat i wanted to know is how can i use it with asp.net and sql server 2005 when any
AFTER DELETE AS
DECLARE @empid int
SELECT @empid=empid from emp_table where locationid=(SELECT locationid from deleted)
IF @@ROWCOUNT=0
DELETE FROM location_table where locationid=(SELECT locationid from deleted)
update,delete or insert query is executed thru the stored procedure...
Pls let me know the above trigger is right or wrong..
What code is required to use the trigger with the application of .NET
thanxs.....