A Look into Transactions in ADO.NET 2.0
page 1 of 5
Published: 15 Mar 2006
Abstract
In this article, we will look into how to manage transactions against SQL Server in ADO.NET 2.0.
by Mohammad Azam
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 17564/ 141

Introduction

We all have used transactions in one way or the other. In this article, I will show you how you can make use of the SqlTransaction class, which is introduced in ADO.NET 2.0.

What are Transactions?

A transaction is a set of operations in which either all of them are successful or all of them fail to ensure consistency. A simple example of a transaction is when you go to the bank and deposit some amount of money and then transfer your deposited amount to another bank account. In this case, all the operations must be performed for the transaction to be valid. This means that if your amount is not deposited and there is not enough money in your bank account, then there will be an error in transferring the funds. For this reason, we use transactions so that either all the operations are performed or none of them are.


View Entire Article

Article Feedback

Title:  
Name:  
Url: ( Optional )
Comment:  
Please add 2 and 7 and type the answer here:

User Comments

Title: keep it up   
Name: peddakapu
Date: 12/4/2007 3:02:24 AM
Comment:
Hi
Mohammad Azam......How r u? The way u r done is very nice.

keep it up ..young man..takecare...
Title: good explain   
Name: naidu
Date: 12/4/2007 2:59:24 AM
Comment:
Thanks...a lot....
Title: nice coding work   
Name: vijay
Date: 12/3/2007 5:13:36 AM
Comment:
the codeing work done by mr azam is very nice
Title: Very Nice   
Name: Irina
Date: 10/30/2007 12:52:12 PM
Comment:
Very clear and simple idea to demonstrate transaction in use. Can be easily modified to see results for other isolation level settings. Nice!
Title: Excellent   
Name: abc
Date: 10/1/2007 8:23:32 AM
Comment:
Excellent way of understanding the Transaction.
Title: Nice (Y)   
Name: Faraz Siddiqui
Date: 9/26/2007 1:38:55 PM
Comment:
Very easy way to understand the Transaction.
Title: SQL Transaction   
Name: Nitin Sharma(.Net Developer)
Date: 7/2/2007 6:33:23 AM
Comment:
The article is very very easy to understand...Keep it up..always...!!
Title: very good   
Name: Lalji Mer
Date: 5/1/2007 3:26:24 AM
Comment:
It is very nice to understand transaction process too.
Title: Very Good   
Name: Sivanthinathan
Date: 3/16/2007 4:42:52 AM
Comment:
It is very nice to understand transaction process.
Title: Very very good   
Name: Paul Gonzales
Date: 1/19/2007 1:01:02 PM
Comment:
My english isn't so good, but i understand all.. this article is excelent.
I'd like get more similar articles.
thanks
Lima-Peru
Title: good   
Name: nitin
Date: 12/7/2006 2:51:01 PM
Comment:
good work. keep it up
Title: GOOD Article   
Name: Rajesh Varma
Date: 11/24/2006 8:59:05 AM
Comment:
ITs Very good Articles...and well presented....
Title: gr8 job   
Name: Rajeev Kumar Shukla
Date: 8/18/2006 8:59:34 AM
Comment:
problem with finally block otherwise article is very good specialy regarding SavePoint in transaction.
Title: Knowledge shareable Article   
Name: Mahendra singh
Date: 7/20/2006 7:43:41 AM
Comment:
wow
that's great Article.
specially the way of explanation is Interesting
Title: Software Engineer   
Name: Premanshu Mukherji
Date: 7/20/2006 7:33:18 AM
Comment:
Very nice article. Dirty Read was well explained. Examples are self explanatory. Good Job.
Title: Best one   
Name: Sudhakar rao
Date: 7/4/2006 1:41:21 AM
Comment:
This article is best one ,i didnt c this type of article .
Thanks keep it up my friends
Title: Problem with IsolationLevel   
Name: Ctut
Date: 4/28/2006 5:42:54 PM
Comment:
The one that you demonstrated in the example above is not known as ReadOnCommited, it's known as a ReadCommitted.
Title: Problem with commit   
Name: Simon Stewart
Date: 4/5/2006 2:58:05 AM
Comment:
Please check your finally block.

You should rather call commit directly after you have done the DB operation.
In your case if an error occurs, your finally block will fail because the transaction is not in a usable state at that point.
Title: Programer Analyst   
Name: Srinivas
Date: 3/23/2006 6:51:56 AM
Comment:
Nice One for novice users
Title: Very Nice Work   
Name: Rupesh kumar Sinha
Date: 3/22/2006 12:52:12 AM
Comment:
Its a great work for them who wants to be updated in latest technology!! Keep it Up
Title: Thanks   
Name: Mohammad Azam
Date: 3/21/2006 7:59:41 PM
Comment:
Thank you very much everyone for your kind comments.
Title: Nicely Done!   
Name: strahman
Date: 3/21/2006 12:10:14 PM
Comment:
Very well written!! Excellent job, Azam!!
Title: Very Good   
Name: sree
Date: 3/21/2006 4:47:41 AM
Comment:
This Artcile is so Informative and Nice.
Title: Nice Article   
Name: Seema Agarwal
Date: 3/17/2006 10:24:19 AM
Comment:
The article is very good and informative. Good work.

Product Spotlight
Product Spotlight 






Ads Powered by Lake Quincy Media
Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2008 ASPAlliance.com  |  Page Processed at 5/12/2008 1:16:23 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search