Article View: borland.public.cppbuilder.database.multi-tier
Article #47how to copy from one dataset to another
From: Sreekanth Reddy Bandi
Date: Fri, 26 Mar 2004 05:53
Date: Fri, 26 Mar 2004 05:53
17 lines
1377 bytes
1377 bytes
Hi,
What is the efficient way of copying from one dataset to another? I think,
the following code is inefficient.
while (!ClientDataSet1->Eof) {
ClientDataSet2->Append();
for (int i = 0; i < ClientDataSet1->FieldCount; i++) {
ClientDataSet2->Fields->Fields[i]->AsVariant =
ClientDataSet1->Fields->Fields[i]->AsVariant;
}
ClientDataSet2->Post();
ClientDataSet1->Next();
}
Thanks in Advance,
Sreekanth
Technical Details
Message-ID:
<4063c553@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed.iinet.net.au!newsfeed.iinet.net.au!PeerFeed.KWeb.on.ca!news.kweb.on.ca!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fcd2b,1590c1d57af82fd9,start X-Google-Attributes: gidfcd2b,public X-Google-ArrivalTime: 2004-03-25 22:05:05 PST From: "Sreekanth Reddy Bandi" <sreekanth_reddy@persistent.co.in> Newsgroups: borland.public.cppbuilder.database.multi-tier Subject: how to copy from one dataset to another Date: Fri, 26 Mar 2004 11:23:23 +0530 Lines: 19 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 203.199.147.2 Message-ID: <4063c553@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1080280403 203.199.147.2 (25 Mar 2004 21:53:23 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed.iinet.net.au!newsfeed.iinet.net.au!PeerFeed.KWeb.on.ca!news.kweb.on.ca!newsgroups.borland.com!not-for-mail