4D v14.3

LOAD RECORD

Home

 
4D v14.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.

 
PROPERTIES 

Product: 4D
Theme: Record Locking
Number: 52

 
HISTORY 

Created: < 4D v6

 
SEE ALSO 

Locked
Record Locking
UNLOAD RECORD

 
ARTICLE USAGE

4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v11 SQL Release 6)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)