qdb_connect()
Connect to a database
Synopsis:
#include <qdb/qdb.h> qdb_hdl_t *qdb_connect( const char *dbname, int flags );
Arguments:
- dbname
- The database device name (e.g., /dev/qdb/customerdb).
- flags
- Flags that determine the connection properties. This argument can be 0 (no flags) or a combination of:
Library:
qdbDescription:
This function connects to the specified database and sets properties of the database
connection. When successful, the function returns a pointer to a handle for the new
connection. You need to call qdb_connect() for every database or
every concurrent access to one database. For an example of connecting to a database,
see Connecting to a database
.
Note:
Two threads can share the same database connection, provided that they coordinate
between themselves. Or, each thread can call this function to obtain its own
connection.
You should terminate all connections by calling qdb_disconnect() when you're finished using them.
Returns:
- A pointer to an opaque database connection handle (qdb_hdl_t)
- Success.
- NULL
- An error occurred (errno is set).
Classification:
QNX Neutrino
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | No |
| Thread | Yes |
Page updated:
