|
|
Lock a table, preventing others from modifying table contents.
- Parameters:
-
| hdb | Database handle. |
| table_name | Table name. |
| lock_mode | Lock mode.
- Timeout mode:
- DB_TRY_LOCK Return immediately if lock can't be granted.
- Lock mode:
- Lock duration:
|
- Returns:
- Table lock handle.
- NULL on failure.
On failure, one of the following error codes is set:
- DB_EINVAL Caused by: invalid database handle, invalid flags, invalid object ID.
- DB_ENOLOCK There are no available lock cells.
- See also:
- get_db_error, clear_db_error, Error Handling
|