QMRecordlocked()

QMRecordlocked()

Top  Previous  Next

 

The QMRecordlocked() function queries the lock on a record. It is analogous to the QMBasic RECORDLOCKED() function.

 

The function arguments are:

 

FileNois the file number returned by a previous QMOpen() call.

 

Idis the id of the record to be locked.

 

 

The QMRecordlocked() function returns one of the following values:

 

Value

Token

Lock state

-3

LOCK$OTHER.FILELOCK

Another user holds a file lock

-2

LOCK$OTHER.READU

Another user holds an update lock

-1

LOCK$OTHER.READL

Another user holds a read lock

0

LOCK$NO.LOCK

The record is not locked

1

LOCK$MY.READL

This user holds a read lock

2

LOCK$MY.READU

This user holds an update lock

3

LOCK$MY.FILELOCK

This user holds a file lock

 

A record may be multiply locked in which case the QMRecordlocked() function reports only one of the current locks. File locks take precedence over read or update locks. If no file lock is set, read or update locks held by the process in which the QMRecordlocked() function is performed take precedence over locks held by other processes.

 

 

hmtoggle_plus1C

 

hmtoggle_plus1VB.Net

 

hmtoggle_plus1QMBasic Class Module

 

hmtoggle_plus1Java

 

hmtoggle_plus1Python

 

 

See also:

RECORDLOCKED(), QMRecordlock