I write a stored prosedure that inserts into 3 tables, the first table have triger on it (generate xml file from the table) . when the procedure execute the first inserted successfuly and the trigger fires and generate the file but the secone and third insert didn't executed.
Note : if the triger removed the 3 insert statment in the stored proceure executed successfully.
I need to have this trigger and to execute the stored procedure.
Any one can help me with this problem
declare @MemberID int
set @MemberID = (select @@identity as MemberID)
exec JoinElsayaratMailinglist @MemberName ,@Gender ,@BirthDate ,@CountryID ,@CityID ,@Profession ,@JobTitle ,@CompanyName ,@EMail ,@Phone ,@Mobile ,@Address, @Subscribed, @MemberID
Perhaps I'm totally out of line here because I must admit that I didn't have time to study your post as much as I'd like to, but could your problem be that you're doing a single insert with many rows and that this only triggers your procedure once?
If this is the case, you should probably loop the inserted table your trigger in order to do the procedurecall once per post in the virtual inserted-table.
If I were you, I'd try to avoid it tho, since it looks like the procedure logic could be incorporated into the trigger instead, thus eliminating atleast one step.
The most likely way for the world to be destroyed, most experts agree, is by accident. That's where we come in; we're computer professionals. We cause accidents.