|
![]() |
![]() |
version 2003
PA_Locked (tableNum) → char
Parameter | Type | Description | |
tableNum | short | → | Table number |
Function result | char | ← | True (1) if current record is locked |
Description
The routine
PA_Locked
woks like the 4th Dimension function
Locked
: it returns 1 if the current record of table number
tableNum
is locked. Otherwise, it returns 0.
Example
Waiting for a record to be unlocked.
short InfiniteLoadingLoop (short tableNum)
{
char isLocked = 1;
// First check if there is no error (bad table number)
isLocked = PA_Locked(tableNum);
if(PA_GetLastError())
return PA_GetLastError();
// Then, here is an infinite loop. As an example. Do not do that in your plug-in !
// while the record is locked.
do
{
// generic C function to delay a process
MyDelayCurrentProcess(10); // 10 ticks
// Load the record
PA_LoadRecord(tableNum);
} while(PA_Locked(tableNum));
return eER_NoErr;
}
See Also
Locked , PA_LoadRecord .
Error Handling
Use
PA_GetLastError
to see if an error occurred (bad table number).