General information
Category:
Coding, syntax & commands
Environment versions
Network:
Windows 2003 Server
>Yuri,
>
>I came across this message when looking on how to import data from a text file via ODBC. Your sample code works very well. Thank you. But I was wondering about something. In the text file from which I am importing, I set names of the fields as the top line. Then when I look at the structure of the cursor "TEMPCRS" all character fields are of type MEMO. Is this by design? I can deal with this since when I append into my table the value from MEMO goes into CHAR type field. But I was just wondering if I might be doing something wrong.
>
>Thank you.
Dmitry,
It is behavior by default in case you did not create schema.ini file with columns description.
schema.ini file should be in the very same directory with Text Source file. It should contain columns proper names (exactly as you have them in the txt file first line). Let us suppose you want to get data fron file yy.csv having the first line like:
msprod,constname,value97,value2000,value2002
Then Schema.ini file looks like:
[yy.csv]
ColNameHeader=True
Format=Delimited(,)
Col1=msprod Char Width 20
Col2=constname Char Width 50
Col3=value97 Char Width 10
Col4=value2000 Long
Col5=value2002 Char Width 10
Good Luck
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only