How can we perform transactions in .NET
How can we perform transactions in .NET?
The most common sequence of steps that would be performed while developing a
transactional application is as follows:
? Open a database connection using the Open method of the connection object.
? Begin a transaction using the Begin Transaction method of the connection object. This method provides us with a transaction object that we will use later to commit or rollback the transaction. Note that changes caused by any queries executed before calling the Begin Transaction method will be committed to the database immediately after they execute. Set the Transaction property of the command object to the above mentioned transaction object.
? Execute the SQL commands using the command object. We may use one or more command objects for this purpose, as long as the Transaction property of all the objects is set to a valid transaction object.
? Commit or roll back the transaction using the Commit or Rollback method of the transaction object.
? Close the database connection.
2007-10-24, 4713👍, 0💬
How can we connect to Microsoft Access , Foxpro , Oracle etc ? Microsoft provides System.Data.OleDb ...
What Is a TD Tag/Element? - XHTML 1.0 Tutorials - Understanding Tables and Table Cells A "td" elemen...
Which bit wise operator is suitable for turning on a particular bit in a number? The bitwise OR oper...
How can I enable session tracking for JSP pages if the browser has disabled cookies? We know that se...
What is continuous and staged representation? CMMI contains 25 key process areas which organization ...