Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Limitations with FileToStr() and StrToFile()

Status
Not open for further replies.

vikasb2

Programmer
Sep 8, 2003
19
0
0
IN
Does anybody know about the limitations with StrToFile() and FileToStr() functions, if any?

I am specially interested in knowing that what is the maximum size of a file these functions can read/write?

An early response will help.

Thanks
Vikas
 
Thanks Lewis for a quick reply.

That I read in MSDN. But I can also do this:
replace alias.memofield with filetostr(<file>)

Now Will this work if the <file> size is 80mb or so?

Vikas


 
Well Chris, With virtual memory and swapping in place RAM can go to sizes more than physically installed on the machine.

Anyways the question is whether filetostr() can handle files of sizes like 80mb or 2gb types.

Vikas


 
Vikas,

Replacing into a memo field won't make any difference. You will still be up against the same limit. Also, the overall maximum for a memo file (FPT file) is 2 GB.

If your text is really so big, maybe you need some other way of managing it.

Mike


Mike Lewis
Edinburgh, Scotland
 
Thanks everybody for providing various views to the problem.

Though I can use low-level file functions but I thought if I use filetostr() it would be easier.

The text I am dealing currently is not that big but still the context, I am writing code for, can get text files so big hence the entire discussion.

Thanks all of you.

This is really nice to talk to VFP guys - its like brotherhood.

Vikas

 

The text I am dealing currently is not that big but still the context, I am writing code for, can get text files so big hence the entire discussion.

I would suggest that you create a file parsing procedure that includes a file splitting function at 64,000 lines, that way you can handle big files.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top