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.
SEEKGT, SEEKGE, SEEKEQ Statements Details
  Syntax  Details  Example                 Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
The SEEKGT, SEEKGE, and SEEKEQ statements cause the first matching record
in an ISAM table to become the current record:
 
            Record becomes current when current-index column value is...
            ════════════════════════════════════════════════════════════
  SEEKGT    Greater than the argument keyvalue.
  SEEKGE    Greater than, or equal to, keyvalue.
  SEEKEQ    Equal to keyvalue.
 
SEEKGT [#]filenumber% ,keyvalue [,keyvalue]...
SEEKGE [#]filenumber% ,keyvalue [,keyvalue]...
SEEKEQ [#]filenumber% ,keyvalue [,keyvalue]...
    ■ The argument filenumber% is the number used in the OPEN statement
      to open the table.
    ■ The keyvalue is an expression less than 256 characters long that is
      evaluated based on the operand condition in the SEEKoperand keyword.
      If more than one keyvalue is specified, BASIC assumes the current index
      is based on the combination of their values.
 
Usage Notes
    ■ The keyvalue expression must be explicitly typed if it is a DOUBLE
      or CURRENCY value.
    ■ If no match is found, the current index position is at the end of
      the table and there is no current record.
    ■ If the number of keyvalues is greater than the number of values that
      makes up the current index, BASIC generates the error message,
      "Syntax error."
    ■ No error is generated if the number of keyvalues is less than the
      number of values that makes up the current index. The seek either
      fails or is based on the keyvalues supplied:
        - SEEKEQ with too few keyvalues always fails.
        - SEEKGE with too few keyvalues is equivalent to a SEEKGE with the
          same arguments.
        - SEEKGT with too few keyvalues seeks for the first record that
          matches the keyvalues supplied.
    ■ BASIC removes trailing spaces from strings used in a seek.