Article View: borland.public.cppbuilder.database.ado
Article #3250Transaction problems
From: Chris Buys
Date: Wed, 06 Nov 2002 09:05
Date: Wed, 06 Nov 2002 09:05
53 lines
2644 bytes
2644 bytes
Hi everyone. I'm experiencing some acute problems with the Transaction commands in the ADOExpress components. Here's the deal: I begin a transaction with the ADOConnection component: FrmMain->DBConnection->BeginTrans(); Then I do a function call to another procedure that executes queries through an ADOQuery com- ponent. Those ADOQuery components has DBConnection as their connection (in other words there is only one (1) connection component in the whole program). Inside the called function at least 3 to 4 insert statements are done to the same table. When the function returns I do a commit: FrmMain->DBConnection->CommitTrans(); When I go and look at the table with the 3 inserted rows only the last row is in actual fact there. The table has an auto-incremented field as primary key. So the table looks like this: ID Description ... 99 First visit <-- start of Transaction 103 Interest calculated. <-- after the commit From the above it is clear that 4 inserts where made but the first 3 were never committed. I'm using BCB5 Enterprise with Update pack 1. Also an ADOExpress update is in place. The ADOConnection component has no Attributes, ConnectionOptions = coConnectUnspecified Provider = SQLOLEDB.1 CursorLocation = clUseClient and I'm working to an SQLServer7/MSDE database. Thanks in advance. Chris ----------------------------------------------------------- Chris Buys (B.Sc. (Comp.Sci.) Stell.) Development HAS Software (Pty) Ltd MedAd2000 Tel: +27 (0)21 553 2402 Fax: +27 (0)21 553 3323 E-mail: mailto:chris@h-a-s.co.za Web: www.h-a-s.co.za
Technical Details
Message-ID:
<3dc8dad6@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-04!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!news.uni-x.net!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,da8bd0abc1188dd1,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2002-11-06 01:20:05 PST From: "Chris Buys" <chris@h-a-s.co.za> Newsgroups: borland.public.cppbuilder.database.ado Subject: Transaction problems Date: Wed, 6 Nov 2002 11:05:58 +0200 Lines: 56 Organization: HAS Software X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 NNTP-Posting-Host: 168.209.28.202 Message-ID: <3dc8dad6@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1036573398 168.209.28.202 (6 Nov 2002 01:03:18 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-04!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!news.uni-x.net!newsgroups.borland.com!not-for-mail