Perform transactions in .net, DOT NET Programming

Assignment Help:

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.


Related Discussions:- Perform transactions in .net

Are you available to discuss about my project, Are you available to discuss...

Are you available to discuss about my project. I'd like you to show first and then accept the project provided if we both agree to continue with each other. Skills required:

Explain toolstrip drop-down button and split button, What is the difference...

What is the difference among a toolstrip drop-down button and a toolstrip split button? The difference among a toolstrip drop-down button and a toolstrip split button is that a

What are the differences between asp and asp .net, What are the differences...

What are the differences between ASP and ASP .Net ?  ASP: Code is Interpreted ASP.NET: Code is Compiled   ASP: Business Logic and Presentation Logic are in a one

Resource files, What are resource files? The Resource files are the fil...

What are resource files? The Resource files are the files which contain program resources. Many programmers think that resource files are used only for storing strings. But you

I need help in web application that will run stand alone, I need help in We...

I need help in Web application that will run stand alone in IIS (MS SQL) 2 activities / Tasks Code web user management module (create user, assign license, simple authorizati

C# program, Write a program interactively two integers using the method con...

Write a program interactively two integers using the method console.readline and int.parse and display their sum

Android to pc communications via bluetooth, Project Description: I am lo...

Project Description: I am looking an app that mimics this app presently available here [justremotephone.com]. It has a nice set of features but also lacks a lot when it comes to

Function points, What are function points? The FPA is breaking huge sys...

What are function points? The FPA is breaking huge systems into smaller pieces and analyzing them. The Software application is a combination of set of elementary processes. The

MySQL, deploying a mysql vb offline desktop application in new system that ...

deploying a mysql vb offline desktop application in new system that doesnot have any server or database created

What is reflection, What is Reflection?  It extends the advantages of m...

What is Reflection?  It extends the advantages of metadata by allowing developers to inspect and use it at runtime. For example, dynamically determine all the classes contained

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd