Get

This method reads data from an open disk file into a variable.

Syntax

file.Get Data, [Recnumber]

Parameters

file
Reference to a File control.
Data
Required. Variant variable into which data is read.
Recnumber
Optional. Variant. Record number at which reading begins. For files opened in binary mode, Recnumber specifies the byte position.

Return Value

None.

Remarks

Data read with the Get method usually is written to a file with the Put method.

The first record or byte in a file is at position 1, the second record or byte is at position 2, and so on. If you omit Recnumber, the next record or byte following the last Get or Put method (or pointed to by the last Seek function) is read.

For files opened in Random mode, the following rules apply:

For files opened in Binary mode, the Len clause in the Open method has no effect. Get reads all variables from a disk contiguously; that is, with no padding between records.