Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trigger causes SQL to not catch updates
Message
From
24/09/1999 12:19:49
 
 
To
24/09/1999 12:13:08
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Miscellaneous
Thread ID:
00268536
Message ID:
00268570
Views:
19
>It seems very odd that the remote view in Fox would have all 1000 records ok, but that the SQL table would be missing records. If the trigger is failing on the back end, wouldn't it cause an update error to be returned to Fox?



Not necessarily. Trigger don't succeed or fail like they do in Visual FoxPro. It's up to you as the developer to check for errors and issue a ROLLBACK TRANSACTION from within the trigger.

If one of the statements in your stored procedure were to fail, it doesn't cause anything to happen automatically. You have to check @@Error after each INSERT, UPDATE, and DELETE and handle the fact that an error occurred. The stored procedure will have to return a status code to the trigger and the trigger will have to issue a ROLLBACK TRANSACTION

-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform