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

mi_server_reconnect()

The mi_server_reconnect() function reestablishes a dropped connection.

Syntax

Usage

The mi_server_reconnect() reestablishes a connection to the database server and database that the connection descriptor, conn, identifies. Use mi_server_reconnect() when the connection that represented a client session is dropped but the connection descriptor still remains. For example, a callback function that handles the MI_LIB_DROPCONN client-library event can use the mi_server_reconnect() function.

All resources in the session context that failed, such as memory and save sets, are preserved and do not need to be rebuilt. However, any transactions that were in progress when the connection failed are no longer valid, so it is the responsibility of the application to purge invalid rows out of save sets.

You cannot reconnect to a database server to which you are already connected.

Return Values

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

Related Topics

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


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