DbiSetLockRetry

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

DbiSetLockRetry

Return to chapter overview

C syntax

DBIResult DBIFN DbiSetLockRetry (iWait);

Delphi syntax

function DbiSetLockRetry (iWait: SmallInt): DBIResult stdcall;

Description

DbiSetLockRetry sets the table and record lock retry time for the current session.

Parameters

iWait                Type: INT16                (Input)
Specifies the lock retry time in seconds. The default setting is five seconds.

Value

Description

<= -1

Any negative value causes infinite retries

= 0

No retry is attempted

>= 1

Number of seconds to retry

Usage

DbiSetLockRetry functions only with Paradox, FoxPro, Access, and dBASE tables. Whenever table or record lock fails, the lock is repeatedly attempted until the retry time expires. If iWait is 0, no retry is performed, resulting in the immediate failure of any unsuccessful lock request. The default setting is five seconds. The following functions retry locking if the lock fails:

Record locks:

       DbiGetNextRecord
       DbiGetRelativeRecord
       DbiGetPriorRecord
       DbiGetRecord

Table locks:

       DbiAcqTableLock

(Persistent table locks are not affected.)

The following functions do not retry locking if the lock fails:

       DbiOpenDatabase
       DbiOpenTable
       DbiSetDirectory
       DbiSetPrivateDir

SQL: This function is not supported with SQL tables.

Completion state

The number of retry seconds is set. Whenever a Paradox, FoxPro, Access, or dBASE table or record lock fails, the lock will be attempted until the retry time limit is reached.

DbiResult

Meaning

DBIERR_NONE

The lock retry time was successfully set for the session.

See also

DbiGetNextRecord, DbiGetPriorRecord, DbiGetRelativeRecord, DbiGetRecord, DbiAcqTableLock, DbiAcqPersistTableLock, DbiSetPrivateDir, DbiSetDirectory, DbiOpenTable