cp_dbms_get_data_source(3)
| cp_dbms(3) | cp_dbms | cp_dbms(3) |
NAME
cp_dbms_get_data_source, cp_dbms_get_data_source_prm - obtain a database connection factory
SYNOPSIS
#include <cprops/db.h>
cp_data_source * cp_dbms_get_data_source(char
*driver, char *host, int port,
char *user, char *passwd, char
*db_name);
cp_data_source * cp_dbms_get_data_source_prm(char
*driver, char *host, int port,
char *user, char *passwd, char
*db_name, cp_hashtable *prm);
DESCRIPTION
cp_dbms_get_data_source attempts to obtain a connection factory for the given driver name to the given database db_name at the given host and port with the user name user and password passwd.
cp_dbms_get_data_source_prm allows passing additional implementation specific parameters in the hash table prm. For the key names and values available see the man pages for specific implementations.
Implementation specific functions returning a data source object may be available if cprops was configured to link dbms driver modules statically. See the driver implementation man pages for details.
RETURN VALUE
a cp_data_source connection factory object for the given parameters on success or NULL on failure.
SEE ALSO
| MARCH 2006 | libcprops |
