INFORMIX
DataBlade API Programmer's Manual
Chapter 12: DataBlade API Function Descriptions
Home Contents Index Master Index New Book

mi_query_finish()

The mi_query_finish() function completes the query active on a connection.

Syntax

Usage

The mi_query_finish() function processes all the remaining rows and throws them away. If all the rows have been processed, mi_query_finish() returns immediately.

The mi_query_finish() function ensures that the database server has processed the results of a statement. It fetches results until the database server is ready for another statement and returns MI_ERROR if the statement failed. If the current statement failed, mi_query_finish() guarantees that the database server is ready for the next statement, unless the database server dropped the connection. All callbacks are properly invoked during mi_query_finish() processing.

The mi_query_finish() function does not affect open statements, prepared statements, or mi_file_ calls.

This function is useful for ensuring that a statement that returns no meaningful results, such as BEGIN WORK, executed successfully.

Return Values

MI_OK

The function was successful.

MI_ERROR

The function was not successful. The current statement failed or no statement is being processed.

Related Topics

For additional information, see the descriptions of the following functions: mi_command_is_finished(), mi_server_connect(), mi_get_result(), and mi_query_interrupt().




DataBlade API Programmer's Manual, version 9.1
Copyright © 1998, Informix Software, Inc. All rights reserved.