Initialize the
Before you can use the to communicate with the database server, you must make sure that it is initialized.
When you establish a connection, the function
automatically initializes the . However,
if your module
does not establish a connection, it must still ensure that it initializes
the .
Important: If the was
not initialized, calls to subsequent functions
generate errors.
The following table lists the functions that can initialize
the .
| initialization function | Valid in client LIBMI application? | Valid in user-defined routine? |
|---|---|---|
| mi_client_locale() | Yes | Yes |
| mi_get_default_connection_info() | Yes | Yes |
| mi_get_default_database_info() | Yes | Yes |
| mi_get_next_sysname() | Yes | No |
| mi_get_parameter_info() | Yes | Yes |
| mi_init_library() | Yes | No |
| mi_open() | Yes | Yes |
| mi_register_callback() | Yes | Yes |
| mi_server_connect() | Yes | No |
| mi_set_default_connection_info() | Yes | Ignored |
| mi_set_default_database_info() | Yes | Ignored |
| mi_set_parameter_info() | Yes | No |
| mi_sysname() | Yes | Yes |
One of the functions listed in the preceding table must be the first function called in a session. If you do not call one of these functions, the is not initialized and all subsequent calls return error status.