|
The mi_set_default_database_info() function sets the default database parameters with values in a user-provided database-information descriptor
| db_info | is a pointer to a user-provided database-information descriptor, which sets the default database parameters. |
The mi_set_default_database_info() function sets default database parameters from the database-information descriptor (MI_DATABASE_INFO structure) that db_info 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 default database parameters for a connection. The mi_open() function can also use these default database parameters when it establishes a connection.
Tip: You must allocate this database-information descriptor before you call mi_set_default_database_info().
If you do not wish to change a particular default value, sets string fields to a NULL-valued pointer and integer fields to 0.
In a user-defined routine, the mi_set_default_database_info() function is ignored.
The mi_set_default_database_info() function initializes the DataBlade API when it is the first DataBlade API function in a client LIBMI application or a UDR.
You can obtain the current database parameters with the mi_get_default_database_info() function.
| 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_database_info(), mi_get_default_database_info(), mi_login(), mi_open(), and mi_sysname().
For more information on the database-information descriptor, see Using Database Parameters.