DbiIsRecordLocked

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

DbiIsRecordLocked

Return to chapter overview

C syntax

DBIResult DBIFN DbiIsRecordLocked (hCursor, pbLocked);

Delphi syntax

function DbiIsRecordLocked (hCursor: hDBICur; var bLocked: Bool): DBIResult stdcall;

Description

DbiIsRecordLocked is used to check if current record is locked in the current session.

Parameters

hCursor                Type: hDBICur                (Input)
Specifies the cursor handle.

pbLocked                Type: pBOOL                (Output)
Pointer to the client variable. Set to TRUE if the record is locked; otherwise, FALSE.

Usage

Record locks differ from table locks in that they only have two states: locked or not locked. Table locks have four states: no lock, read lock, write lock, or exclusive lock.

Prerequisites

The cursor must be positioned on a record.

Completion state

The lock status is returned in pLocked, and indicates whether the record is locked by any application in the current session.

SQL: For SQL, the lock status returned in pLocked indicates whether the record is locked by you.

DbiResult

Meaning

DBIERR_NONE

The lock status was returned successfully.

DBIERR_NOCURRREC

There is no current record.

DBIERR_BOF

There is no current record at the beginning of the file.

DBIERR_EOF

There is no current record at the end of the file.

DBIERR_KEYORRECDELETED

There is no current record.

DBIERR_INVALIDHNDL

The specified cursor handle is invalid or NULL.

DBIERR_INVALIDPARAM

pbLocked is NULL.

See also

DbiGetNextRecord, DbiGetPriorRecord, DbiGetRecord, DbiGetRelativeRecord, DbiRelRecordLock, DbiIsTableLocked, DbiAcqTableLock, DbiRelTableLock