Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trigger causes SQL to not catch updates
Message
De
24/09/1999 12:19:49
 
 
À
24/09/1999 12:13:08
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Divers
Thread ID:
00268536
Message ID:
00268570
Vues:
20
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform