Perform transactions in .net, DOT NET Programming

How can we perform transactions in .NET?

The common sequence of steps that would be performed for developing a transactional application is as follows:

1)In the first step open a database connection by using the Open method of the connection object.

2)In the second begin a transaction by using the Begin Transaction method of the connection object. This method gives us with a transaction object that we will use later to commit or rollback the transaction. Keep in mind that changes caused by any queries executed before calling the Begin Transaction method will be committed to the database immediately after they execute. Now Set the Transaction property of the command object to the above mentioned transaction object.

3)In the third step execute the SQL commands by using the command object. We can 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.

4)In the fourth step roll back or commit the transaction by using the Commit or Rollback method of the transaction object.

5)At last close the database connection.

Posted Date: 9/24/2012 5:08:51 AM | Location : United States

Related Discussions:- Perform transactions in .net, Assignment Help, Ask Question on Perform transactions in .net, Get Answer, Expert's Help, Perform transactions in .net Discussions

Write discussion on Perform transactions in .net
Your posts are moderated
Related Questions
I Need paypal and urolator pro api integrated in to aspx site Project Description: Need paypal and urolator pro api integrated in to aspx site. The is presently completed and

Full Time Coder My colleague is seeking for someone to work on his website via team viewer. First I would need scale following skills- a) C# - b) AJAX - c) LINQ to S

inheritance real time examples

Write a C# program (C# console application) that plays a word game with the user. The program should ask the user to enter the following: • His or her name • His or her age

Question: (a) Write extract codes to show the structure of the Global.asax file. (b) Outline four classes that allow you to work with File Streams. (c) When working with

C# coding to include user specified screen recording to app Project Description: Reposting as selected coder didn't read brief and accepted job to do then tell me would be in

Which are the namespaces in localization and globalization? There are 2 most important namespaces:- 1)System.Globalization - It contains classes that define culture-relate

sir, i just trapped in decryption.....wud u plz help me

What is event bubbling? The Server controls such as  DataList, Datagrid,  Repeater can have another child controls inside them. For example the DataGrid can have combo box ins

Sir can you suggest me a project that I am do that i present in last year project work