Article View: borland.public.cppbuilder.database.ado
Article #5442ADO: How To Mantain Record Status when Batch Updating
From: Piero Salandin
Date: Sat, 05 May 2001 18:06
Date: Sat, 05 May 2001 18:06
29 lines
2332 bytes
2332 bytes
I am really upset by this, and I really don't know how can I manage this Horrible, Awful ADO error. I'll try to explain more clearly what need. I am using BatchUpdates in an ADO environment with CBuilder 5 Ent. This means that I have client cursors and that actually changes are cached until a global command is issued to "update all changes". This allows changes on multiple tables to be issued in a consistent way without locking the tables for a long time. When some DB error occurs (I am using MS Sql Server 7, but any transactional database is ok), an exception is thrown so the Commit is not issued, but a Rollback is, and then the error is displayed. So, let's say we have inserted 3 rows in a grid, and that one of those three raise an error from the database (i.e.: duplicate primary key). Obviously, because of the transaction management, none of the three rows is saved into the Database. I would exprct that when I correct the problem on the only wrong row, all three rows get saved on the database, to reflect the grid status. This does not happen, insted only the newly modified row gets saved. Seems that the status of the records in the TADODataSet is lost even if the records are not saved. I'm asking if there is a way to save that status, or if I did something wrong, or what. Thanks A LOT to who'll reply with sense.
Technical Details
Message-ID:
<3af44374_1@dnews>Path:
arc1-ca.pugleaf.net!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!netnews.com!xfer02.netnews.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnewsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f5cad,27870919545ae7a4,start X-Google-Attributes: gidf5cad,public X-Google-Thread: 10698b,27870919545ae7a4,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2001-05-05 11:25:44 PST From: "Piero Salandin" <piero.salandin@libero.it> Newsgroups: borland.public.cppbuilder.database.ado,borland.public.delphi.database.ado Subject: ADO: How To Mantain Record Status when Batch Updating Date: Sat, 5 May 2001 20:06:01 +0200 Lines: 33 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: 151.25.122.134 Message-ID: <3af44374_1@dnews> X-Trace: dnews 989086580 151.25.122.134 (5 May 2001 11:16:20 -0700) Path: arc1-ca.pugleaf.net!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!netnews.com!xfer02.netnews.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews