Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Import big text file into DBF or DBC
Message
From
19/08/2006 06:13:01
 
 
To
18/08/2006 14:53:00
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01144692
Message ID:
01146977
Views:
39
>Thanks Peter,
>
>A long time I did not used low level function, would you please some coding
>samples how to use : fread,fopen,fclose,fwrite
>
>TIA

I am on the way out but a quickie fist
* create a textfile
x1=PADR("abc",30)+PADL("1234",15)+PADR("abc",30)+PADL("1234",15)+PADR("abc",30)+PADL("1234",15)
X2=""
FOR i = 1 TO 100
	X2 = X2 + X1+CHR(13)+CHR(10) 
ENDFOR
STRTOFILE(X2,"inputfile.txt")


*MODIFY FILE inputfile.txt
* now read it back

liHandle=FOPEN("inputfile.txt")


FOR I=1 TO 10
x5=FGETS(liHandle)
?X5
* now parse the line and sve the stuff somewhere.....
*....

ENDFOR 
hope this gets you started
if you have more questions let me know I will be back later this afternoon


Peter
Peter Cortiel
Previous
Reply
Map
View

Click here to load this message in the networking platform