The mi_set_default_database_info() function

The mi_set_default_database_info() function sets the default database parameters with values from a database-information descriptor that the user provides.

Syntax

mi_integer mi_set_default_database_info(db_info)
   MI_DATABASE_INFO *db_info;
db_info
A pointer to a user-provided database-information descriptor, which sets the default database parameters.
Valid in client LIBMI application? Valid in user-defined routine?
Yes Ignored

Usage

Client only: The mi_set_default_database_info() function sets default database parameters with user-defined values 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. The mi_open() function can use these database parameters when it establishes a connection.

You must allocate this database-information descriptor before you call mi_set_default_database_info().

If you do not want to change a particular default value, set the string fields to a NULL-valued pointer and the integer fields to 0.

Server only: 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_set_default_database_info() function.

For more information about the database-information descriptor or more information about how to use the database-information descriptor, see the HCL OneDB™ DataBlade API Programmer's Guide.

Return values

MI_OK
The function was successful.
MI_ERROR
The function was not successful.