Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Nested transactions and rollback
Message
De
09/03/2010 04:00:55
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Nested transactions and rollback
Divers
Thread ID:
01453374
Message ID:
01453374
Vues:
91
Hi

I want to create a stored procedure that creates a Client record, then it adds a new record into the ClientOrder, ClientStock and ClientReturn tables using the newly created ClientID. However, I want the process to take place so that if any of the subsequent inserts fail, I can rollback all of the tables to the position they were in before the insert into Client (and rollback the Client table too).

I'd want a stored procedure called, for example, SP_Client_Add, and then that stored procedure would call SP_ClientOrder_Add, SP_ClientOrder_Add and SP_ClientReturn_Add. The reason for having the 3 child stored procedures is so that I can also call them individually if need be.

Regards
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform