ADO.NET transaction Processing.Steps to use transaction object:
- Open a database connection. - Create the transaction object using BeginTransaction method of connection object. - Create command object by using transaction object as the parameter. - Execute the commands and check for the error. - If no error, commit the changes to the database or restore the database state. - Close the connection.
The transaction object handles concurrency issue using IsolationLevel settings. The settings can be
- ReadUncommitted - Chaos - ReadCommitted - RepeatableRead - Serializable
|