Article View: borland.public.cppbuilder.database.ado
Article #5626Re: ADO and Transactions
From: Mehdin Hod�i�
Date: Fri, 23 Mar 2001 10:00
Date: Fri, 23 Mar 2001 10:00
37 lines
1766 bytes
1766 bytes
I'm not sure if you can do that, but if you can check for the transaction
type.I thing it should not be Isolated or something like this, try with
ReadUncommited or any other type
Cem Uzunlar <turing@anet.net.tr> wrote in message news:3aa789a6_2@dnews...
> C1 and C2 are ADOConnection objects
> Q2 and Q2 are ADOQuery objects
>
> Following code raises and exception when second record tries to do
> updatebatch. If we dont use transactions, the problem goes away.
>
> How can we solve this problem?
>
> Thanks.
>
> C1->Open();
> C2->Open();
>
> C1->BeginTrans();
> C2->BeginTrans();
>
> Q1->Open();
> Q2->Open();
>
> Q1->Append();
> Q1->FieldByName("A1")->AsFloat = 5000;
> Q1->UpdateBatch( arCurrent );
>
> Q2->Append();
> Q2->FieldByName("A1")->AsFloat = 6000;
> Q2->UpdateBatch( arCurrent );
>
> C1->CommitTrans();
> C2->CommitTrans();
>
>
>
Technical Details
Message-ID:
<3abb1c32$1_1@dnews>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!news-out.usenetserver.com!news-out-sjo.usenetserver.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews!195.222.35.51References:
<3aa789a6_2@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,46547804a3f05f03 X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2001-03-23 02:02:02 PST From: "Mehdin Hod�i�" <mehha@yahoo.com> Newsgroups: borland.public.cppbuilder.database.ado References: <3aa789a6_2@dnews> Subject: Re: ADO and Transactions Date: Fri, 23 Mar 2001 11:00:05 +0100 Lines: 39 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 NNTP-Posting-Host: 195.222.35.51 Message-ID: <3abb1c32$1_1@dnews> X-Trace: 23 Mar 2001 01:49:38 -0800, 195.222.35.51 Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!news-out.usenetserver.com!news-out-sjo.usenetserver.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews!195.222.35.51