db_hlock_t db_lock_table ( db_t  hdb,
const db_objname_t table_name,
db_flags_t  lock_mode 
)

Lock a table, preventing others from modifying table contents.

Parameters:
hdb Database handle.
table_name Table name.
lock_mode Lock mode.
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


Copyright © 2005-2008 ITTIA®. All rights reserved.