Article View: borland.public.cppbuilder.database.ado
Article #3705how to use updatebatch
From: szzwt
Date: Wed, 10 Jul 2002 04:16
Date: Wed, 10 Jul 2002 04:16
29 lines
1530 bytes
1530 bytes
hello,
I tried to use updatebatch to insert some records into a table,I write
code like:
db_conn->Open();
db_dataset->CursorLocation = clUseServer;
db_dataset->CursorType=ctKeyset;
db_dataset->LockType = ltBatchOptimistic;
db_dataset->CommandType = cmdText;
db_dataset->CommandText="select * from qd ";
db_dataset->Open();
db_dataset->Insert();
db_dataset->FieldByName("kh")->Value = myrec.kh;
.....
//Sjfx_DM->db_dataset->Post(); //if I add this line,it can't work
neither;
Sjfx_DM->db_dataset->UpdateBatch(arAll);
which is the correct way to use updatebatch?
Any suggestion is appreciated~
Technical Details
Message-ID:
<3d2bb51d_1@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnewsReferences:
<3d16bf57$1_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,245e9e27193aa62b X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2002-07-09 21:49:25 PST From: "szzwt" <amsdn@hotmail.com> Newsgroups: borland.public.cppbuilder.database.ado References: <3d16bf57$1_1@dnews> Subject: how to use updatebatch Date: Wed, 10 Jul 2002 12:16:12 +0800 Lines: 35 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 NNTP-Posting-Host: 202.104.119.71 Message-ID: <3d2bb51d_1@dnews> X-Trace: dnews 1026274589 202.104.119.71 (9 Jul 2002 21:16:29 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews