DataBlade API Programmer's Manual
Chapter 5: Managing Sessions
Home
Contents
Index
Master Index
New Book
Connections with mi_server_connect() and mi_login()
More control is available when you use
mi_server_connect()
to establish the connection and
mi_login()
to open the database. These routines provide greater flexibility for applications that run against different database servers and databases by passing information about the connection and the database through descriptors. Because it is best to use the default database server,
mi_open()
is preferable in a server application.
The
mi_server_connect()
function establishes a connection using the information in an
MI_CONNECTION_INFO
descriptor. It does not open a database. Once you establish the connection with
mi_server_connect()
, open the database with
mi_login()
. The
mi_login()
function uses an
MI_DATABASE_INFO
descriptor to provide information about the database to open.
When you no longer need a connection, close it with
mi_close()
.
DataBlade API Programmer's Manual
, version 9.1
Copyright © 1998, Informix Software, Inc. All rights reserved.