Unlock File Method

The Unlock File method controls access to an open file. It does not return a value.

You must use the Lock File method and the Unlock File method in pairs to unlock a file, and the arguments that you use with these methods must be identical. For more information, see Lock File Method.

You must remove a lock before you close the file. For more information, see Lock File Method.

Format

Unlock [#]filenumber[, {record | [start] To end} ]

The following table describes the arguments that you can use with this method.

Argument Description

filenumber

The file number that the Open statement uses to open the file. For more information, see Open File Method.

record

An integer that identifies the first record to unlock.

start

A long integer that identifies the first record or byte offset to unlock.

end

A long integer that identifies the last record or byte offset to unlock.

Example

For an example of the Unlock statement, see Lock File Method.