Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delimited Text File with fields greater than 254 chars.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01312930
Message ID:
01363629
Vues:
23
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform