BeginTransaction in ADO.NET

BeginTransaction in ADO.NET

am 09.02.2006 06:15:25 von s_b_shanmu

Hi
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 ***

Re: BeginTransaction in ADO.NET

am 09.02.2006 14:32:31 von reb01501

B.Santha Baktha Shanmugam wrote:
> Hi
> While using ADO.Net i want to use Begin & Commit Transactions to
> prevent the data.
>
There was no way for you to know it, but this is a classic asp newsgroup.
While you may be lucky enough to find a dotnet-savvy person here who can
answer your question, you can eliminate the luck factor by posting your
question to a newsgroup where the dotnet-savvy people hang out. I suggest
microsoft.public.dotnet.framework.adonet.

HTH,
Bob Barrows



--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.