Database Independent Abstraction Layer for C: libdbi Programmer's Guide | ||
---|---|---|
Prev | Chapter 7. libdbi API Reference | Next |
Creates an instance of libdbi, locates all available database drivers and loads them into memory.
driverdir: The directory to search for drivers. If NULL, DBI_DRIVER_DIR (defined at compile time) will be used instead.
pInst: A pointer to an instance handle. The function will fill in the new instance handle if successful, or set it to NULL if an error occurred.
The number of drivers successfully loaded, or -1 if there was an error. The latter may be due to an incorrect driver directory or to a lack of permissions.
0.9.0
Locates all available database drivers and loads them into memory.
Note: This function is deprecated. Use dbi_initialize_r instead. In contrast to that function, dbi_initialize allows only one (internally managed) libdbi instance per process.
driverdir: The directory to search for drivers. If NULL, DBI_DRIVER_DIR (defined at compile time) will be used instead.
The number of drivers successfully loaded, or -1 if there was an error.
Frees all loaded drivers and terminates the libdbi instance. You should close each connection you opened before shutting down, but libdbi will clean up after you if you don't.
Inst: The instance handle.
0.9.0
Frees all loaded drivers and terminates the DBI system. You should close each connection you opened before shutting down, but libdbi will clean up after you if you don't.
Note: This function is deprecated. Use dbi_shutdown_r instead.
Toggles internal error messages on or off in the given libdbi instance. This affects only those error messages which are directly sent to stderr, not those handled by the connection error API.
verbosity: A nonzero value causes error messages to be printed on stderr. 0 (zero) suppresses error messages.
Inst: The instance handle.
The previous setting of verbosity
.
0.9.0
Toggles internal error messages on or off. This affects only those error messages which are directly sent to stderr, not those handled by the connection error API.
Note: This function is deprecated. Use dbi_set_verbosity_r instead.
verbosity: A nonzero value causes error messages to be printed on stderr. 0 (zero) suppresses error messages.
The previous setting of verbosity
.
Requests the version of libdbi as a read-only string. The calling program must not attempt to free the returned string.
A string containing the library's name and version.
Requests the version of libdbi as an integer.
The version, computed as ((major * 10000) + (minor * 100) + patch).
0.9.0