AdsLockTable

Advantage Client Engine

Attempts to lock the given table

Syntax

UNSIGNED32

AdsLockTable (ADSHANDLE hTable);

Parameters

hTable (I)

Handle of table

Special Return Codes

AE_LOCK_FAILED

The attempted lock failed. The lock may be held by another user.

AE_TABLE_NOT_SHARED

A lock was attempted on a table opened exclusively.

Remarks

A successful call to AdsLockTable prevents other applications from being able to update the table. It is recommended that you lock tables prior to creating indexes. Any record locks that have been obtained prior to calling AdsLockTable will be released. If the Advantage Client Engine fails to lock the table (e.g., if another user has record locks), then the Advantage Client Engine does not attempt to relock the records that it released.

Note This API only accepts table handles. The use of a cursor handle with this API is illegal and will result in an error. See AdsExecuteSQL for more details.

Example

Click Here

See Also

AdsOpenTable

AdsIsTableLocked

AdsLockRecord

AdsUnlockTable