![]() |
|
The mi_get_database_info() function populates a database-information descriptor with current database parameters for an open connection.
The mi_get_database_info() function populates the database-information descriptor (MI_DATABASE_INFO structure) that db_info references with the current database parameters for the connection that conn references. The database parameters include the name of the database, the user account, and the account password. You can then pass the db_info descriptor to mi_login() to specify the database parameters for a connection.
Tip: You must allocate this database-information descriptor before you call mi_get_database_info().
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.
In a user-defined routine, mi_get_database_info() retrieves the same information as mi_get_default_database_info().
MI_OK | indicates that the function was successful. |
MI_ERROR | indicates that the function was not successful. |
See the descriptions of the following functions: mi_get_connection_info(), mi_get_default_database_info(), mi_get_parameter_info(), mi_get_serverenv(), mi_login(), and mi_set_default_database_info().
For more information on the database-information descriptor, see Obtaining Current Database Parameters.