Skip to main content
Version: Next

SQL LOAD RECORD

SQL LOAD RECORD {( numRecords )}

ParameterTypeDescription
numRecordsIntegerNumber of records to load

This command is not thread-safe, it cannot be used in preemptive code.

Description

The SQL LOAD RECORD command retrieves one or more record(s) in 4D coming from the data source open in the current connection.

The optional numRecords parameter sets the number of records to retrieve:

  • If you omit this parameter, the command retrieves the current record from the data source. This principle corresponds to the retrieval of data in a loop where one record is received at a time.
  • If you pass an integer value in numRecords, the command retrieves numRecords records.
  • If you pass the SQL All Records constant (value -1), the command retrieves all the records of the table.

Note: These last two settings are only useful when the retrieved data is associated with 4D arrays or fields.

System variables and sets

If the command has been executed correctly, the system variable OK returns 1. Otherwise, it returns 0.

See also

SQL CANCEL LOAD
SQL EXECUTE