Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Memo to separate fields
Message
From
05/05/2001 18:33:24
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00503943
Message ID:
00503949
Views:
22
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform