Skip to main content
Version: 20 R7 BETA

LOAD RECORD

LOAD RECORD {( aTable )}

ParameterTypeDescription
aTableTableTable for which to load record, or Default table, if omitted

Description

LOAD RECORD loads the current record of aTable. If there is no current record, LOAD RECORD has no effect.
You can then use the Locked function to determine whether you can modify the record:

  • If the table is in read-only state, the Locked function returns TRUE, and you cannot modify the record.
  • If the table is in read/write state but the record was already locked, the record will be read-only, and you cannot modify the record.
  • If the table is in read/write state and the record is not locked, you can modify the record in the current process. The Locked function returns TRUE for all other users and processes.

Note: If the LOAD RECORD command is executed after a READ ONLY, the record is automatically unloaded and loaded without having to use the UNLOAD RECORD command.

Usually, you do not need to use the LOAD RECORD command, because commands like QUERY, NEXT RECORD, PREVIOUS RECORD, etc., automatically load the current record.

In multi-user and multi-process environments, when you need to modify an existing record, you must access the table (to which the record belongs) in read/write mode. If a record is locked and not loaded, LOAD RECORD allows you to attempt to load the record again at a later time. By using LOAD RECORD in a loop, you can wait until the record becomes available in read/write mode.

Tip: The LOAD RECORD command can be used to reload the current record in the context of an input form. All the data modified are then replaced by their previous values. In this case, the LOAD RECORD command carries out a sort of general cancellation of data entry.

See also

Locked
Record Locking
UNLOAD RECORD