Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Vilhelm-Ion Praisach
  Where is Vilhelm-Ion Praisach?
 Resita
 Romania
 Vilhelm-Ion Praisach
 To: Michael Milling
  Where is Michael Milling?
 Mobile
 Alabama - United States
 Michael Milling
 Tags
Subject: RE: Tab delimited file to ALINES
Thread ID: 395556 Message ID: 395592 # Views: 41 # Ratings: 4
Version: Visual FoxPro 6 Category: General VFP Topics
Date: Thursday, January 16, 2014 5:24:24 AM         
   


> >
> >
> >
> > The FileToStr() syntax is wrong, but the "Append From" command does not work with Memo columns anyway.
> >
> > You could use "LLF" functions, something like
> >
lnHandle = FOPEN(m.lcFile)
> > Do While Not FEof(m.lnHandle)
> >     lcLine = FGETS(m.lnHandle, 8192)
> >     ALine(laLines, STRTRAN(m.lcLine, CHR(9), CHR(13)+CHR(10)))
> >     && and so forth
> > 

> >
> > Or perhaps use FileToStr() to get the entire content, and then use ALines() twice to get the lines first and then the "words" from each line, something like
> >
> > lcContent = STRTOFILE(m.lcFile)
> > ALINES(laLines, m.lcContent)
> > ALINES(laWords, laLines[1], 0, CHR(9))
> > ? laWords[1] && and so on
> > 

> >
> >
> >
> > hth
> > -Stefan
>
> Thank you for the reply. I am on VFP 6, so the additional arguments in ALINES do not work with this version I belive.

You're right, sorry for that. It was late :-)

FOR i = 1 TO ALINES(aTemp, FILETOSTR("zzzz.txt")) &&Delimited somehow?
	lc1=left(aTemp[i],at(chr(9),aTemp[i])-1)
	lc2=substr(aTemp[i],at(chr(9),aTemp[i])+1,at(chr(9),aTemp[i],2)-at(chr(9),aTemp[i])-1)
	lc3=substr(aTemp[i],at(chr(9),aTemp[i],2)+1,at(chr(9),aTemp[i],3)-at(chr(9),aTemp[i],2)-1)
	lc4=substr(aTemp[i],at(chr(9),aTemp[i],3)+1)
	INSERT INTO cTemp(example1, example2, oldMemo, newMemo) VALUES (lc1, lc2, lc3, lc4)
ENDFOR



My respects

ENTIRE THREAD

Tab delimited file to ALINES Posted by Michael Milling @ 1/15/2014 9:01:27 PM
RE: Tab delimited file to ALINES Posted by Ali Koumaiha @ 1/15/2014 9:18:14 PM
RE: Tab delimited file to ALINES Posted by Michael Milling @ 1/15/2014 9:23:14 PM
RE: Tab delimited file to ALINES Posted by Vilhelm-Ion Praisach @ 1/15/2014 9:32:43 PM
RE: Tab delimited file to ALINES Posted by Stefan Wuebbe @ 1/15/2014 9:44:18 PM
RE: Tab delimited file to ALINES Posted by Michael Milling @ 1/15/2014 10:06:45 PM
RE: Tab delimited file to ALINES Posted by Vilhelm-Ion Praisach @ 1/16/2014 5:24:24 AM
RE: Tab delimited file to ALINES Posted by Michael Milling @ 1/16/2014 8:12:37 PM
RE: Tab delimited file to ALINES Posted by Stefan Wuebbe @ 1/16/2014 6:04:11 AM
RE: Tab delimited file to ALINES Posted by Anders Altberg @ 1/16/2014 12:04:51 AM