Home | Previous Page | Next Page   Function Descriptions >

mi_set_default_database_info( )

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
is 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.

Tip:
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.

End of Client Only
Server Only

In a user-defined routine, the mi_set_default_database_info( ) function is ignored.

End of Server Only

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.

Return Values

MI_OK
indicates that the function was successful.
MI_ERROR
indicates that the function was not successful.

Related Topics

See also the descriptions of mi_get_database_info( ), mi_get_default_database_info( ), mi_open( ), and mi_sysname( ).

For more information on the database-information descriptor or more information on how to use the database-information descriptor, see the IBM Informix: DataBlade API Programmer's Guide.

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]