Building a database by procedure
Vic Glassley
newdata at thelincolngroup.com
Thu Feb 21 10:58:27 PST 2008
> Related to my question about importing a CSV file vs. simply opening a
> CSV file:
>
> I can create a CSV file with column headers as record No. 1, and give it
> a specific name, but when I simply OPEN that file, my columns are
> numbered and the first record holds the names they should have.
>
> Looking through options in the "info(" choices, it looks like all I can
> get would be the count of records, etc.
>
> Question: what method would let me collect all contents of Record 1 into
> an array ("lineNum, title, author, blurb..." etc) and then set the names
> of the columns with that array?
Maybe this will help. Someone on the list helped me with this some time ago.
// Import data and have first record be field names.
Local folder,file,type,FirstRow
OpenFileDialog folder,file,type,"TEXT"
if file = "" stop endif
OpenFile folderpath(folder) + file
FirstRow = exportline()
GoDesignSheet
Field "Field Name"
FormulaFill array(FirstRow,seq(),chr(9))
NewGeneration
GoSheet
ClearRecord
Good luck
vic
I will also need to add new columns and
> name those, and of course these all have to be in a specific order.
>
> Can this be done?
>
> Thanks for any pointers,
>
> Steve
>
More information about the Qna
mailing list