Disconnecting from Databases

From InterBase
Jump to: navigation, search

Go Up to Working with Databases


When an application is finished accessing a database, and any changes are committed or rolled back, the application should disconnect from the database, release system resources allocated for the attachment, and set the database handle to zero with a call to isc_detach_database().

isc_detach_database() requires two arguments: a pointer to the error status vector, and a pointer to the handle of the database from which to detach. For example, the following statement detaches from the database pointed to by the database handle, db1:

isc_detach_database(status_vector, &db1);

Each database to detach requires a separate call to isc_detach_database().

Advance To: