db_result_t db_drop_index ( db_t  hdb,
const db_objname_t table,
const db_objname_t index 
)

Removes an index from a table.

Parameters:
hdb Database handle.
table Table name.
index Index name.
Returns:
On failure, one of the following error codes is set:
  • DB_EINVAL Caused by: invalid database handle, field binding is null, invalid table information.
  • DB_EINDEX General index error. Unable to find the index with the specified name.
  • 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_index, db_describe_index,
get_db_error, clear_db_error, Error Handling


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