General information
Category:
Coding, syntax & commands
>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only