Initializing Database Handles
Go Up to Creating Database Handles
Before a database handle can be used to attach to a database, it must be set to zero. The following code illustrates how two database handles are set to zero:
#include <ibase.h> . . . isc_db_handle db1; isc_db_handle db2; . . . /* Set database handles to zero before attaching to a database. */ db1 = 0L; db2 = 0L;
Once a database handle is initialized to zero, it can be used in a call to isc_attach_database
() to establish a database connection. If a nonzero database handle is passed to isc_attach_database()
, the connection fails and an error code is returned. For more information about establishing a database connection with isc_attach_database
(), see