Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reading a CSV file into an array
Message
From
29/11/2001 12:47:55
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
29/11/2001 11:57:12
John Marrone
Bloodstock Research Inc.
Lexington, Kentucky, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00587527
Message ID:
00587572
Views:
28
>I need to read a comma seperated text file with quotes around strings.
>Each record has 1500 fields. Since VFW tables can have only 255 fields I
>need to read this file I quess byte by byte into an array, then assign to
>different tables the data I need. Could someone explain to me the best way
>to do this. I did it by useing FileToStr and then did a substr loop to read
>each character and pharsed the filethat way. It took forever to complete the
>process. The average file is about 500k. Thank you in advance for any help.
>I am starting a very data intensive project that will proably take over a year
>todo. I can do this easlie in VB. But don't know the best way in VFW.
>
>Thanks
>John Marrone
>Bloodstock Research Inc.
>jmarrone@brisnet.com

I think an array wouldn't work for you (at least with one pass).
A 500K file reading is a snap. After filetostr you could loop mline() to output portions of columns (ie: From 300th comma to 500th) to different files and append from them.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform