|
The mi_server_reconnect() function reestablishes a dropped connection.
| conn | is a pointer to the connection descriptor a previous call to mi_open(), mi_server_connect(), or mi_server_reconnect() has established. |
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.
| MI_OK | indicates that the function was successful. |
| MI_ERROR | indicates that the function was not successful. |
See the descriptions of the following functions: mi_open() and mi_server_connect().