Put statment maximums

Jez
Jez used Ask the Experts™
on
I am writing a random access file, and I want to be able to write upto 2,147,483,647 (the upper limit of a long integer) - but I am getting a "Bad Record Number" when writing record 2,147,483,642

The MSDN helpfile states that the Put statement recnumber syntax is as follows:
recnumber: Variant (Long). Record number (Random mode files) or byte number (Binary mode files) at which writing begins.

Does anyone know the maximum numner of records a Put statement will write?

Thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
Hi Jez !

The maximum Size of a file on 32-Bit Windows is 2GB (2,147,483,647 Bytes).
Because of this you can't have only have

(2147483647:(length of each record)) records

v.k.
Jez

Author

Commented:
Thanks VK - this solves the problem!

Commented:
Fat16 has a limit of 2GB, Fat32 has a limit of 4 GB, NTFS has a limit of ... care to guess?

Commented:
Fat16 has a limit of 2GB, Fat32 has a limit of 4 GB, NTFS has a limit of ... care to guess?

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial