The mi_get_database_info() function
The mi_get_database_info() function populates a database-information descriptor with current database parameters for an open connection.
Syntax
mi_integer mi_get_database_info(conn, db_info)
MI_CONNECTION *conn;
MI_DATABASE_INFO *db_info;
- conn
- A pointer to a connection descriptor established by a previous call to mi_open(), mi_server_connect(), or mi_server_reconnect().
- db_info
- A pointer to a user-provided database-information descriptor, which stores the current database parameters.
Valid in client LIBMI application? | Valid in user-defined routine? |
---|---|
Yes | Yes |
Usage
Field | Data type | Description |
---|---|---|
database_name | char * | The name of the database |
user_name | char * | The user account name, as defined by the operating system |
password | char * | The account password, as defined by the operating system |
The mi_get_database_info() function also initializes the DataBlade® API when it is the first DataBlade API function in a client LIBMI application or a user-defined routine.
For a description of the database-information descriptor, more information about how to examine the database-information descriptor, or more information about ways to interact with the session environment, see the HCL OneDB™ DataBlade API Programmer's Guide.
Return values
- MI_OK
- The function was successful.
- MI_ERROR
- The function was not successful.