4D v16.3

LOAD RECORD

Home

 
4D v16.3
LOAD RECORD

LOAD RECORD 


 

LOAD RECORD {( aTable )} 
Parameter Type   Description
aTable  Table in Table for which to load record, or Default table, if omitted

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

 
PROPERTIES 

Product: 4D
Theme: Record Locking
Number: 52

This command can be run in preemptive processes

 
HISTORY 

Created: < 4D v6

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)