> I know this must be so basic but I need to know how to see data in a .txt file so that I can parse out what I need to populate existing tables. I see how you can create an ascii file from a dbf everywhere but can't find anything on how to read from an ascii file in my program. I know how to parse the data out once I can see it - I'm just stuck between where I have the user browse for the .txt file on their machine and my code that search the data for what I need. Its probably so basic it there doesn't need to be anything written about it! lol.
>
> If anyone can point me in the right direction I'd really appreciate it!
>
> Thanks,
> T.
>
> Just saw a similar thread below. Sorry for the duplicate post.
> Thanks guys.
Theresa,
Further to what Barbara gave you, if your text file has strange or difficult formatting, you might need to read through it using FOPEN(), FGETS(), FSEEK() and FCLOSE(). Use FOPEN() to give you an integer "handle" and the use FSEEK() to go to the correct record and FGETS() to read the record into a string variable.
If the file is small, you can simply read the whole file into a string variable with FILETOSTR() and then use ALINES() to look at each record.
Hope this helps.
Ken
You shall know the truth - and the truth shall set you free. (John 8:33)