cp_dbms

Section: cp_dbms (3)
Updated: MARCH 2006
Index Return to Main Contents
 

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)


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 22:48:28 GMT, April 10, 2006
SourceForge.net Logo