Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Memo to separate fields
Message
De
05/05/2001 18:33:24
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00503943
Message ID:
00503949
Vues:
20
>A always receive the information bellow
> by e-mail and copy it to an memo field.
>
> Name: xxxxxx
> Adress: xxxx
> State: xxxxxx
> Phone: xxxxxx
> Country:xxxxxxxxxxxxx
>
>
> Afterwards a have to trasfer line by line
> to characters fields.
>
>
> How can I programatically transfer each line
> to the chacarters fields below ?
>
>
> Nome:
> adress:
> State:
> Phone:
> Country:
>
>
>thanks
>
>Moisés

Moises,
If format is like this matching structure you could do :
set memowidth to 1024
lnLines = alines(arrLines,FileToStr(myFile),.T.) 
for ix = 1 to lnLines
 store substr(arrLines[ix],at(':',arrLines[ix])+1) to ;
     ('m.'+substr(arrLines[ix],1,at(':',arrLines[ix])-1))
endfor
insert into myTable from memvar
However here I assumed one record per email. If not so you could parse recs too.
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform