Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reading text files and populate form properties
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01114169
Message ID:
01114180
Views:
26
This message has been marked as the solution to the initial question of the thread.
>Hi friends
>i need to read a text file and populate a form properties.
>the text file will contain values like below
>
>2,someidshere,typeofclaim
>
>how can i read abv text file and populate following form properties. like below ?
>thisoform.prop1="2"
>thisoform.prop2="someidshere"
>thisoform.prop1="typeofclaim"

Hi Rajaini

You have a number of choices. Though it is not clear from your post, I assume that you provided a record/line in the text file. Then you may use:

?ALINES(awords,FILETOSTR("c:\hi1.txt"),.t.,",",CHR(13))

to dump all words separately in the array awords, or

?ALINES(arecords,FILETOSTR("c:\hi1.txt"),.t.,",",CHR(13))

to get records, and then pick words from the particular appropriately.

Or you may append the text file to the temporarely cursor/table:
CREATE TABLE c:\hi1 (fld1 n(2), fld3 c(15),flcd4 c(15))
APPEND FROM c:\hi1 delim WITH ,


Good Luck
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform