version 2003
PA_LoadRecord (tableNum)
Parameter | Type | Description | |
tableNum | short | Table number |
Description
The routine PA_LoadRecord loads or reloads the current record for the table number tableNum. If there is no current record PA_LoadRecord does nothing.
PA_LoadRecord works like the 4th Dimension command LOAD RECORD. Please refer to the 4th Dimension documentation to learn more about loading records and its modes (read only, read write, locked)
Example
Loop or loading an unlocked record.
/* waiting the record to be unlocked a timeout is used to avoid infinite loop a call to PA_Yield MUST BE DONE in such case, to give the 4D scheduler time to process other tasks. If this is not done, the user will think its computer is frozen. */ void LoadRecordUnlocked(short tNum, long timeOut) { long start; if(timeOut <= 0) timeOut = 60;//default value // GetTicks is a routine returns the tick count under Windows and MacOS start = GetTicks(); do { PA_Yield(); PA_LoadRecord(tableNum); } while ( PA_Locked(tableNum) || ((GetTicks() - start) < timeOut) ); }
See Also
Error Handling
Use PA_GetLastError to see if an error occurred (bad table number).