Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread ImportTable Operation
Sat, Dec 1 2012 9:44 AMPermanent Link

Norman Kleinberg

I have need to use the ImportTable method for a DBISAM Table and a csv file. Normally I would just create a table with field names identical to the CSV file headers (as viewed in Excel) and use default options. Unfortunately, the headers in this CSV file contain spaces and other characters and I really would prefer to create my own field names. As well I need to have an extra column in the table for conversion purposes.

I've looked at the description in the online docs of the ImportTable method and can't quite figure out how to do this. "Incoming Fields" at first seems to be a TStringList of the names of the fields I want to IMPORT from the CSV, but in another part of the docs it is implied (or stated) that it is a list of fields in the TABLE that I want to be filled. Can anyone kindly clear up what "Incoming Fields" is for and how I might tell ImportTable that I'd like THIS column from the CSV imported into THAT column in the table?

Thanks for any pointers.
Tue, Dec 11 2012 10:59 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Norman,

<< I've looked at the description in the online docs of the ImportTable
method and can't quite figure out how to do this. "Incoming Fields" at first
seems to be a TStringList of the names of the fields I want to IMPORT from
the CSV, but in another part of the docs it is implied (or stated) that it
is a list of fields in the TABLE that I want to be filled. Can anyone kindly
clear up what "Incoming Fields" is for and how I might tell ImportTable that
I'd like THIS column from the CSV imported into THAT column in the table? >>

Incoming fields refers to the fields in the *table*.  To map the column
names to specific field names, just specify the field names in the
IncomingFields parameter so that they map to the desired column in the
incoming csv file.

Tim Young
Elevate Software
www.elevatesoft.com
Image