Article View: borland.public.cppbuilder.database.ado
Article #5680ADO and Transactions
From: Cem Uzunlar
Date: Thu, 08 Mar 2001 13:30
Date: Thu, 08 Mar 2001 13:30
29 lines
1697 bytes
1697 bytes
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:
<3aa789a6_2@dnews>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!zeus.visi.com!hermes.visi.com!news-out.visi.com!nycmny1-snh1.gtei.net.MISMATCH!cpk-news-hub1.bbnplanet.com!lsanca1-snf1!news.gtei.net!newsfeed2.earthlink.net!newsfeed1.earthlink.net!newsfeed.earthlink.net!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsfeed01.tsnz.net!bornews.borland.com!dnews!212.146.171.109Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,46547804a3f05f03,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2001-03-08 05:40:07 PST Reply-To: "Cem Uzunlar" <turing@anet.net.tr> From: "Cem Uzunlar" <turing@anet.net.tr> Newsgroups: borland.public.cppbuilder.database.ado Subject: ADO and Transactions Date: Thu, 8 Mar 2001 15:30:01 +0200 Lines: 32 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 NNTP-Posting-Host: 212.146.171.109 Message-ID: <3aa789a6_2@dnews> X-Trace: 8 Mar 2001 05:31:18 -0800, 212.146.171.109 Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!zeus.visi.com!hermes.visi.com!news-out.visi.com!nycmny1-snh1.gtei.net.MISMATCH!cpk-news-hub1.bbnplanet.com!lsanca1-snf1!news.gtei.net!newsfeed2.earthlink.net!newsfeed1.earthlink.net!newsfeed.earthlink.net!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsfeed01.tsnz.net!bornews.borland.com!dnews!212.146.171.109