Article View: borland.public.cppbuilder.database.ado
Article #2964Re: Importing data form diferent tables and database types
From: Max Luzin
Date: Tue, 18 Feb 2003 08:09
Date: Tue, 18 Feb 2003 08:09
27 lines
1894 bytes
1894 bytes
"In�s Fern�ndez" <ifernandezmed@terra.es> wrote in message
news:3e4cf489$1@newsgroups.borland.com...
> Hi all!
> I am working in a program that must import data from a DBase table to
> another table in an SQL server database. The second table has two more
> fields than the first one, but the rest of the fields are the same.
You can use two ADO datasets: one for import (dBase) and second for export
(SQL Server). Something like this:
ImpTable->First();
while (!ImpTable->Eof)
{
// Process each record here
ExpTable->Append();
ExpTable->Fields->Fields[0]->Value = ... // Process field values from
ImpTable (conversion, etc)
ExpTable->Fields->Fields[1]->Value = ...
ExpTable->Fields->Fields[2]->Value = ...
// ... and so on
ExpTable->Post();
ImpTable->Next();
}
Max
Technical Details
Message-ID:
<3e51e988@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3e4cf489$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10698b,5718363b56ae1b18 X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2003-02-18 00:10:03 PST Reply-To: "Max Luzin" <maksim.luzin@wsy.lt> From: "Max Luzin" <maksim.luzin@wsy.lt> Newsgroups: borland.public.cppbuilder.database.ado References: <3e4cf489$1@newsgroups.borland.com> Subject: Re: Importing data form diferent tables and database types Date: Tue, 18 Feb 2003 10:09:40 +0200 Lines: 30 Organization: Western Shipyard X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 212.59.13.100 Message-ID: <3e51e988@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1045555592 212.59.13.100 (18 Feb 2003 00:06:32 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail