SE_table_lock

Locks a table.

Usage syntax

LONG SE_table_lock
(SE_CONNECTION connection,
const CHAR *table,
LONG lock_mode);

Parameters
connection The connection handle
table A pointer to a table name
lock_mode The lock type
Description

SE_table_lock locks a table. Lock modes are:

SE_TABLE_SHARED_SCHEMA_LOCK

SE_TABLE_EXCLUSIVE_SCHEMA_LOCK

A shared schema lock will prevent others from changing the table schema until the lock is released. A shared schema lock will also prevent someone from deleting a table or changing its permissions. Multiple users can establish shared schema locks. If a shared schema lock exists on a table, other users can’t establish an exclusive schema lock until all shared schema locks are released.

Use an exclusive schema lock to change a table’s schema. An exclusive schema lock will prevent other users from setting exclusive or shared schema locks until the exclusive schema lock is freed. If a user has already placed a schema lock on a table, the lock mode is updated to reflect the most recent call.

Returns

SE_SUCCESS
SE_CONNECTION_IN_USE

SE_CONNECTION_LOCKED

SE_DB_IO_ERROR

SE_INVALID_CONNECTION

SE_INVALID_PARAM_VALUE

SE_INVALID_POINTER

SE_NET_FAILURE

SE_OUT_OF_CLMEM

SE_OUT_OF_SVMEM

SE_SDE_NOT_STARTED

SE_TABLE_NOEXIST

Notes

•  A call to the SE_table_free_list function must be made to free the array of table names allocated by the SE_table_list function.