Information générale
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
>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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement