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

I want workflow designer, I want Workflow Designer (HTML5) Project Descr...

I want Workflow Designer (HTML5) Project Description: I am seeking an HTML5 designer for a custom workflow tool. It should have drop and drag functionality. Saving it as XML

Operator overloading in .net, What is Operator Overloading in .NET? It ...

What is Operator Overloading in .NET? It gives a way to define and use operators like +, -, and / for user-defined classes or structs. It permits us to define/redefine the way

Explain difference between the clone and copy methods, What is the differen...

What is the difference between the Clone() and Copy() methods of the DataSet class? The Clone() method copies only the structure of a DataSet. The copied structure having all t

Name the classes that are in the system.numerics namespace, Name the classe...

Name the classes that are introduced in the System.Numerics namespace. The following two new classes are introduced in the System.Numerics namespace:  BigInteger - Refers

Want microsoft crm dynamics crm 2011 or 2013 programmer, Want Microsoft CRM...

Want Microsoft CRM Dynamics CRM 2011 or 2013 programmer Project Description: Need to do customizations in CRM itself and integrate CRM 2011 with SAP Business One and HTML web

Need to develop doctor appointments application in .net, 31: Need to dev...

31: Need to develop Doctor Appointments application in .NET Project Description: I am seeking a .NET Web application which can do the subsequent: 1. Taking doctors and

Differences between the detailsview and formview controls, Question: (a...

Question: (a) Give three key differences between the DetailsView and FormView controls. (b) The ASP.NET 2.0 Framework introduces the idea of validation groups. How Valida

Reference counting in com, What is Reference counting in COM? The Refer...

What is Reference counting in COM? The Reference counting is a memory management method used to count the number of times an object has a pointer referring to it. The very firs

Jquery and mvc 4.5 training session, I am looking individuals who have indu...

I am looking individuals who have industry experience working on Microsoft Technology and Jquery ( MVC 4.5 ), who will take live online session and give training through Team Viewe

I need a pos like openbravo, I need a POS like openbravo Project Descrip...

I need a POS like openbravo Project Description: i want a POS like openbravo in .net with sql azure and c#. Must be designed also for touch screen.  Web platform Also m

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