DbiRelPersistTableLock

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

DbiRelPersistTableLock

Return to chapter overview

C syntax

DBIResult DBIFN DbiRelPersistTableLock (hDb, pszTableName, [pszDriverType]);

Delphi syntax

function DbiRelPersistTableLock (hDb: hDBIDb; pszTableName: PChar; pszDriverType: PChar): DBIResult stdcall;

Description

DbiRelPersistTableLock releases the persistent table lock on the specified table for the associated session.

Parameters

hDb                Type: hDBIDb                (Input)
Specifies the database handle.

pszTableName                Type: pCHAR                (Input)
Pointer to the name of the table. For Paradox, if pszTableName is a fully qualified name of a table, the pszDriverType parameter need not be specified. If the path is not included, the path name is taken from the current directory of the database associated with hDb.

For SQL databases, this parameter can be a fully qualified name that includes the owner name.

pszDriverType                Type: pCHAR                (Input)
Pointer to the driver type. Optional. For Paradox tables, this parameter is required if pszTableName has no extension. pszDriverType must be szPARADOX. This parameter is ignored if the database associated with hDb is a SQL database.

Usage

This function is valid only with Paradox and SQL tables, since only Paradox and SQL tables can have persistent locks placed on them.

dBASE, FoxPro, Access: This function is not supported with dBASE, FoxPro, and Access tables.

Completion state

The number of persistent locks on the table is decremented. If this is the last persistent lock on the table, the lock is released.

DbiResult

Meaning

DBIERR_NONE

The lock was released successfully.

DBIERR_INVALIDHNDL

The specified database handle is invalid or NULL.

DBIERR_INVALIDPARAM

The specified table name or the pointer to the table name is NULL.

DBIERR_NOTLOCKED

The specified table does not have a persistent lock placed on it.

See also

DbiAcqPersistTableLock