Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Delimited Text File with fields greater than 254 chars.
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01312930
Message ID:
01363650
Views:
16
>
>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

Yuri,

Thank you very much! I didn't know that you can use a schema.ini; this is very helpful. One thing is missing in the schema file is ability to define a default, if the source file has empty string. Otherwise, NULL value is set into the cursor. But I will find a way to get around this little shortcoming.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform