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

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

Demonstrating use of break, Demonstrating use of break, continue & goto - C...

Demonstrating use of break, continue & goto - C# Program How can i use break, continue & goto in my assignment, I am looking for a program in C#. It would be feel great if any

Define passport authentication, Passport Authentication This is a centr...

Passport Authentication This is a centralized authentication service given by Microsoft that offers a single logon facility and membership services for participating sites. ASP

Thread.join() in threading, What is Thread.Join() in threading? There a...

What is Thread.Join() in threading? There are 2 versions of Thread.Join :- Thread.join(). Thread.join(Integer) this returns a Boolean value. The Thread.Join

Need experienced dot net and php programmers, Need Experienced dot Net and ...

Need Experienced dot Net and PHP Programmers Project Description: Need Experienced dot Net., JSP, PHP, Java Programmers Skilled professional and command in Programming eit

Develop a new website, I need to develop a new website. Previous site was n...

I need to develop a new website. Previous site was not good and I need better one with not only static but using also more details . Skills required: .NET, MySQL, C# Programm

Todo list - finalize application, The purpose of this project is to ?nalize...

The purpose of this project is to ?nalize your TODO application.  For this project we are aiming to achieve the following: Objectives: Integrate a fully functional mobile

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

Develop nesting software with unit costing, Develop Nesting software with u...

Develop Nesting software with unit costing for gasket manufacturing Project Description: Our current gasket costing software is old and antiquated and has limited use interna

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