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

Develop a alphabates and numbers generators screen, how we can display a a...

how we can display a alphabets by identifies an image and if its different than show someother alpbabets.

I want high skilled c++ programmers, I want high skilled C++ programmers ...

I want high skilled C++ programmers Project Description: I want to hire the developer, who are proficient in C/C++ and have experience with STL and work with the data structu

Com components use in .net, How can COM Components use in .NET? The .NE...

How can COM Components use in .NET? The .NET components can communicate with COM using RCW (Runtime Callable Wrapper). The ways with which you can generate RCW are as shown bel

Which command-line tool generates code and mapping, Which command-line tool...

Which command-line tool generates code and mapping for the LINQ to SQL component of .NET Framework? The SqlMetal.exe command-line tool generates code and map the LINQ to SQL co

Name the control that exposes the linq features, Name the control that expo...

Name the control that exposes the LINQ features to Web developers through the ASP.NET data-source control architecture. The LinqDataSource control exposes the LINQ features to

Illustrate the basic process in an asp.net architecture, Problem: (a) ...

Problem: (a) (i) Using a diagram, illustrate the basic process in an ASP.NET Architecture involving at least five objects. (ii) List two methods and two collections

Project life cycle, Explain project life cycle. Figure: -Life cyc...

Explain project life cycle. Figure: -Life cycle of a project There are 5 stages of any project initiating, planning, executing, controlling, & closeout. These are the

Project management, What is project management? Applying the knowledge,...

What is project management? Applying the knowledge, skills, techniques, tools in project and deliver project deliverable is a short definition of the project management. It's b

Name the binders provided by .net framework 4.0, Name the binders provided ...

Name the binders provided by .NET Framework 4.0. .NET Framework 4.0 provides the following binders: Object Binder - Enables to communicate with .NET objects. JavaScrip

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