Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How can we perform transactions in .NET
How can we perform transactions in .NET?
✍: Guest
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, 5058👍, 0💬
Popular Posts:
Does there exist any other function which can be used to convert an integer or a float to a string? ...
How do we configure “WebGarden”? “Web garden” can be configured by using process model settings in...
How To Decrement Dates by 1? - MySQL FAQs - Introduction to SQL Date and Time Handling If you have a...
What is the difference between const char* p and char const* p? In const char* p, the character poin...
How To Define a Data Source Name (DSN) in ODBC Manager? - Oracle DBA FAQ - ODBC Drivers, DSN Configu...