Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Low Level File Functions have a 2 gig limit
Message
From
16/12/2003 19:44:33
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00859708
Message ID:
00859728
Views:
13
All file access in VFP is limited to 2 GB. Most character functions also have a limit of 2 GB; IIRC, some functions are limited to 16 MB.

Perhaps you can divide your text file, for instance, into yearly or monthly files.

>1st incorrectly sent the first copy to ALL :(
>
>The VFP bug form at MS is down
>
>Detailed description of the problem
>
>The Low Level file functions (fseek, fopen etc) have a 2 gig limit when working with text files. PS The transaction files I look at are growing 30-40 % per year so the file will be 2.5 - 3gig next year.
>
>The Documentation actually doesn't say anything that I could find
>
>However I really thought it was "unlimited "
>
>I worked with MS Support and they confirmed it
>
>Steps to reproduce
>
>lnHandle=fopen("over2igfile.txt')
>fseek(2590000000) &&returns zero
>lcline = fread(lnHandle,100)
>?lcLine &&returns all blanks
>
>Observed results
>
>Although the Fopen command will open the 2gig plus file all other commands won't move past the "2gig" limit ie. the largest integer number fseek won't move past it and fread returns blanks even thougth the data is there...;(
>
>Expected results
>
>lnHandle=fopen("over2igfile.txt')
>fseek(2590000000) &&returns 2590000000
>lcline = fread(lnHandle,100)
>?lcLine &&returns the next 100 charaters from the file
>
>Additional notes and workarounds
>
>The work around suggested by MS Support (Grant S.) was to use the "Scripting.FileSystemObject"
>
>Which is OK but no random access in the file only one way bof -> eof
>so can't check for the existance of the footer until the end of the job :(
>
>1st record is header (Contains the date)
>***HEADER:01/01/2003*****
>
>Last record is the Footer (Contains the number of records)
>***EOF***00036251551****
>
>Visual FoxPro version
>
>Visual FoxPro 8 Service Pack 1
>
>Windows version
>
>Windows XP Service Pack 1
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform