Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to check for error in a trigger?
Message
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01520325
Message ID:
01520330
Vues:
24
>>My UI is built in such a way that only one row can be deleted from the parent table anyway. But I will see if I still should add your code that check and raises the error.
>>
>>As far as my original question. Are you saying that if any UPDATE CHILD in my trigger fails the SQL Server will raise an error anyways? What if update of CHILD 3 fails, will SQL Server roll back the changes to the CHILD 1 and 2?
>>
>>Thank you.
>
>The best way is to try and test. Without testing I'm guessing that none of the updates will take place is one of the updates fail.

I agree with you; this is the right way. I just need to learn how to make one of the child updates to fail :). Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform