cp_dbms_get_data_source(3) - Linux man page
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
cp_db_postgres(3), cp_db_mysql(3)