Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to copy text file line by line to memo field?
Message
From
10/07/2006 04:19:19
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
How to copy text file line by line to memo field?
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01134853
Message ID:
01134853
Views:
204
Hi all,

I have text files with lines of data and I wanted to copy them line by line to a memo field of a table, 1st line go to 1st record, 2nd line go to 2nd record. I have tried the following codes but somehow when the length of the line exceeds 50, it will append the following characters into 2nd record. Any idea?
CREATE CURSOR lctest (mdata m)
nline = MEMLINES(FILETOSTR(TRANSFORM(lcfile))) && lcfile = file name
	
FOR i=1 TO nline
   INSERT INTO lctest VALUES (MLINE(FILETOSTR(TRANSFORM(lcfile)),i))
ENDFOR 
Next
Reply
Map
View

Click here to load this message in the networking platform