🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #3706

which is the correct way to use updatebatch?

#3706
From: szzwt
Date: Wed, 10 Jul 2002 04:24
29 lines
1593 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: <3d2bb71b_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!isdnet!news.interware.hu!news-out.nuthinbutnews.com!propagator-sterling!news-in.nuthinbutnews.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,2cddadf592a4f7aa,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2002-07-09 22:14:11 PST
From: "szzwt" <amsdn@hotmail.com>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: which is the correct way to use updatebatch?
Date: Wed, 10 Jul 2002 12:24:43 +0800
Lines: 38
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: <3d2bb71b_2@dnews>
X-Trace: dnews 1026275099 202.104.119.71 (9 Jul 2002 21:24:59 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!isdnet!news.interware.hu!news-out.nuthinbutnews.com!propagator-sterling!news-in.nuthinbutnews.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews