db_result_t db_drop_table ( db_t  hdb,
const db_objname_t name 
)

Drop a table from a database.

Parameters:
hdb Database handle.
name Table name. A name must start with a letter and can be followed by one or more letters, numbers, or underscores.
Returns:
On failure, one of the following error codes is set:
  • DB_EINVAL Casued by: invalid database handle.
  • DB_ENAME Table name is not in a valid format.
  • DB_ELOCKED Table is locked by cursor or concurrent transaction.
  • DB_ETXSTATE A transaction is active.

A table can only be altered or dropped when there is no active transaction. If a transaction has been started, db_commit_tx or db_abort_tx must be used before db_drop_table can be called.

See also:
db_create_table,
get_db_error, clear_db_error, Error Handling


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