I'm converting an old DOS program written in Borland Turbo Basic to VB.

When using random access files, TB supports a FIELD statement which defines the field variables in the random access buffer. The FIELD statement uses the same file stream as the file being opened, so

FIELD #1 4 AS x$, 4 AS y$

would define the field as two variables.

You then simply GET the record, e.g.

rec=1000
GET #1, rec

which is written into the variables defined in the field.

What has happened to the FIELD statement in VB?

VB seems to want me to GET the field as a single variable, as in

GET #1, temptext

I'm trying to read the old DOS data file with VB and it keeps generating a "Bad Record Length" error. I am wondering whether or not this is because I have been unable to convert the FIELD statement?

Any help would be much appreciated.

Thanks in advance, David Atherton.