informix
Informix DataBlade API Programmer's Manual
DataBlade API Function Descriptions

mi_login()

The mi_login() function opens a database on the current connection.

Syntax

Usage

The mi_login() function opens a database that the MI_DATABASE_INFO structure, db_info, identifies. Only one database can be associated with a given connection at a time. The mi_login() function obtains information about the current database server from the connection descriptor that conn references.

Important: The mi_login() function does not establish a connection. Use the mi_server_connect() function to specify the database server to which you wish to establish the connection.

This function is used for client LIBMI applications that run against different database servers. When you use mi_server_connect() to establish a connection to a database server, use mi_login() to open a database.

Return Values

MI_OK indicates that the specified connection was established.
MI_ERROR indicates that the function was not successful: the client application cannot connect to the database server, the database does not exist, or the user does not have permission to access the database.

Related Topics

See the descriptions of the following functions: mi_close(), mi_get_database_info(), mi_open(), and mi_server_connect().

For a discussion on establishing a connection with mi_server_connect() and mi_login(), see Connections with mi_server_connect() and mi_login(). For more information about MI_DATABASE_INFO and other data structures, see Initializing a Connection.


Informix DataBlade API Programmer's Manual, Version 9.2
Copyright © 1999, Informix Software, Inc. All rights reserved