Go Up to API Function Reference
Deletes a currently attached database and all of its supporting files, such as secondary database files, write-ahead log files, and shadow files.
ISC_STATUS isc_drop_database( ISC_STATUS *status_vector, isc_db_handle *db_handle);
Pointer to the error status vector
Pointer to a database handle set by a previous call to
isc_drop_database() deletes an attached database and all of its supporting files. Call this routine when you no longer have a use for the database (for example, if you moved all the data into another database, or if the database was just temporary and is no longer needed). To succeed,
isc_drop_database() must be issued when no other processes are attached to the database.
The following conditional statement drops a database:
if (handle) isc_drop_database(status_vector, &handle);
handle is valid and identifies an attached database, the specified database is dropped when this statement executes.
isc_drop_database() returns the second element of the status vector. Zero indicates success. A nonzero value indicates an error. For InterBase errors, the first element of the status vector is set to 1, and the second element is set to an InterBase error code.
To check for an InterBase error, examine the first two elements of the status vector directly. For more information about examining the status vector, see Handling Error Conditions.