02-24-2026, 03:45 PM
(02-24-2026, 12:49 PM)bplus Wrote: @SMcneill OK I didn't know you could do a Random Access without LEN in Open statement, was that in QB4.5?
It defaults to a LEN of 128. Unless you specify the size, your records are going to be 128 bytes each.
The difference is in the variable type you use to write the data. If you use a variable-length string, it writes the size first as a 2-byte integer. Otherwise, since every other variable type is a set number of bytes, it just uses that size automatically and doesn't record those 2-bytes for you.
OPEN.... LEN = x
If you use variable length strings, they have to be a max of x - 2 bytes in length or you'll get errors. Otherwise, any other data type has to be less than x bytes in length. If LEN is not specified, then it defaults to 128.

