Example: lrd_open_connectionAccess Management Functions

Connects (logs in) to the database.

LRDRET lrd_open_connection( LRD_CONNECTION **mpptConnection, unsigned int muiDBType, char *mpszUser, char *mpszPassword, char *mpszServer, char *mpszExtConnectStr, LRD_CONTEXT *mptContext, long mliOption, int miDBErrorSeverity );

mpptConnection A pointer to a pointer to an LRD_CONNECTION structure.
muiDBType The target database type.
mpszUser A pointer to the database user ID.
mpszPassword A pointer to the database user password.
mpszServer A pointer to the database server name.
mpszExtConnectStr A pointer to an extended connection string.
mptContext A pointer to an LRD_CONTEXT structure. NULL for all other databases.
mliOption ODBC only - One of the Open Connection options.
miDBErrorSeverityThe Error Severity Levels of a failure in a database routine.

The lrd_open_connection function sets up the LRD_CONNECTION structure. The structure is valid until it is freed with lrd_close_connection.

For more details refer to the Function Header File lrd.h in the include directory.

Return Values

See LRD Return Values.


The following arguments can be parameterized using standard parameterization: mpszUser, mpszPassword, mpszServer, mpszExtConnectStr