Requesting Information About an Attachment

From InterBase

Go Up to Working with Databases

After an application attaches to a database, it may need information about the attachment. The isc_database_info() call enables an application to query for attachment information, such as the version of the on-disk structure (ODS) used by the attachment, the number of database cache buffers allocated, the number of databases pages read from or written to, and write-ahead log information.

In addition to a pointer to the error status vector and a database handle, ­isc_database_info() requires two application-provided buffers, a request buffer, where the application specifies the information it needs, and a result buffer, where InterBase returns the requested information. An application populates the request buffer with information prior to calling isc_database_info(), and passes it both a pointer to the request buffer, and the size, in bytes, of that buffer.

The application must also create a result buffer large enough to hold the information returned by InterBase. It passes both a pointer to the result buffer, and the size, in bytes, of that buffer, to isc_database_info(). If InterBase attempts to pass back more information than can fit in the result buffer, it puts the value, isc_info_truncated, defined in ibase.h, in the final byte of the result buffer.


Advance To: