Thread View: borland.public.cppbuilder.database.multi-tier
2 messages
2 total messages
Started by Sreekanth Reddy Bandi
Fri, 26 Mar 2004 05:53
how to copy from one dataset to another
Author: 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
Re: how to copy from one dataset to another
Author: vavan
Date: Fri, 26 Mar 2004 08:00
Date: Fri, 26 Mar 2004 08:00
16 lines
1530 bytes
1530 bytes
On Fri, 26 Mar 2004 11:23:23 +0530, "Sreekanth Reddy Bandi" <sreekanth_reddy@persistent.co.in> wrote: >What is the efficient way of copying from one dataset to another? I think, >the following code is inefficient. you better ask in borland.public.DELPHI.database.multi-tier since there's no much activity in this group regarding your question, I use almost the same code except that instead of AsVariant I use Value though probably there are more efficient ways to achieve the goal -- Vladimir Ulchenko aka vavan
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads