🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: simple loop to copy all rows from one table to another. (using TVarRec)

#5104
From: Mark Cashman
Date: Thu, 12 Jul 2001 01:12
35 lines
1839 bytes
Hi, Doulas!

It might be better to try something like this...

OracleDataSet->Open();
NewTable->Open();

OracleDataSet->First();

while (!OracleDataSet->Eof)
{
    NewTable->Edit();

    for (int Index = 0; Index < OracleDataSet->FieldCount; Index++)
    {

NewTable->FieldByName(OracleDataSet->Fields->Fields(Index)->FieldName)->Value
=
            OracleDataSet->Fields->Fields(Index)->Value; // Ensures that
field is the same by name - does not reply on position
    };

    NewTable->Post();
    OracleDataSet->Next();
};


------
Mark Cashman (TeamB - C++ Builder), creator of The Temporal Doorway at
http://www.temporaldoorway.com
- Original digital art, writing, music and more -
C++ Builder / JBuilder Tips and The C++ Builder Programmer's Webring
(Join us!)
http://www.temporaldoorway.com/programming/index.htm
------
Technical Details
Message-ID: <3B4CF967.F62A868C@temporaldoorway.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews
References: <3b4c3fc2_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,28bedb73628f75d6
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2001-07-11 18:17:25 PST
Message-ID: <3B4CF967.F62A868C@temporaldoorway.com>
Date: Wed, 11 Jul 2001 21:12:08 -0400
From: Mark Cashman <mcashman@temporaldoorway.com>
Reply-To: mcashman@temporaldoorway.com
X-Mailer: Mozilla 4.77 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Re: simple loop to copy all rows from one table to another. (using 
 TVarRec)
References: <3b4c3fc2_2@dnews>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 24.14.197.193
X-Trace: dnews 994900396 24.14.197.193 (11 Jul 2001 18:13:16 -0700)
Lines: 37
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews