bas7advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
UNLOCK Statement Details
  Syntax  Details  Example                 Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
UNLOCK releases locks applied to parts of a file.
 
UNLOCK [#]filenumber% [,{record& | [start&] TO end&}]
    ■ The argument record& can be any number between 1 and 2,147,483,647,
      inclusive, (equivalent to 2^31 -1). A record can be up to 32,767 bytes
      in length.
    ■ For binary-mode files, the arguments record&, start&, and end& represent
      the number of a byte relative to the beginning of the file. The first
      byte in a file is byte 1.
    ■ For random-access files, record&, start&, and end& are the number of a
      record relative to the beginning of the file. The first record is
      record 1.
 
Important
    ■ Be sure to remove all locks with an UNLOCK statement before closing
      a file or terminating your program. Failing to remove locks produces
      unpredictable results.
    ■ The arguments to LOCK and UNLOCK must match exactly.
    ■ Do not use LOCK and UNLOCK on devices or ISAM tables.