Bad record length
Among the possible causes of this error are:
The length of a record variable specified in a
FileGet
,FileGetObject
,FilePut
orFilePutObject
statement differs from the length specified in the correspondingFileOpen
statement.The variable in a
FilePut
orFilePutObject
statement is or includes a variable-length string.The variable in a
FilePut
orFilePutObject
is or includes aVariant
type.
To correct this error
Make sure the sum of the sizes of fixed-length variables in the user-defined type defining the record variable's type is the same as the value stated in the
FileOpen
statement'sLen
clause.If the variable in a
FilePut
orFilePutObject
statement is or includes a variable-length string, make sure the variable-length string is at least 2 characters shorter than the record length specified in theLen
clause of theFileOpen
statement.If the variable in a
FilePut
orFilePutObject
is or includes aVariant
make sure the variable-length string is at least 4 bytes shorter than the record length specified in theLen
clause of theFileOpen
statement.
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for