Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using transactions
Message
 
 
À
11/08/2011 08:09:05
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Divers
Thread ID:
01520658
Message ID:
01520665
Vues:
42
>Hi
>
>I'm creating some stored procedures which are inserting a set of records into various tables in my database.
>
>I want to wrap each set of inserts in a transaction so only a complete set get added.
>
>How do I make sure that any errors are picked up and stop the transaction being committed.
>
>Thanks

Take a look at my blog post showing an example of a procedure that utilizes transactions and TRY/CATCH:
How to insert information into multiple related tables and return ID using SQLDataSource
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform