BeginTransaction in ADO.NET
am 09.02.2006 06:15:25 von s_b_shanmuHi
While using ADO.Net i want to use Begin & Commit Transactions to
prevent the data.
My situation is like this,
I want to read some data from the table using dataset or datareader,
so a loop will run.
Under the main loop two insertions using command object should
happen. For each insertion a dataset or datareader should run for to get
some additional values.
Here more chances for data mismatch or data unavailability, so for
this conditions i want to rollback the process entirely.
What the problem i am getting is,
When i am using without BeginTransaction this is working, but when
using BeginTransaction, the first loop is running and insertion is
happening,
but while come to the second data fetch ( note : it fetching the
same table where the first insertion happens), it is giving timeout
error(But data is very low size only).
Give me solution for it as soon as possible.
*** Sent via Developersdex http://www.developersdex.com ***