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

mi_query_interrupt()

The mi_query_interrupt() function interrupts the current statement.

Syntax

Usage

The mi_query_interrupt() function interrupts execution of the current statement on the connection that conn references. The current statement is the most recently executed SQL statement sent to the database server on that connection. This function releases the resources for the current statement. If the current statement was a query, mi_query_interrupt() closes any implicit cursor that mi_exec() or mi_exec_prepared_statement() opened to hold the rows.

Tip: The need to process remaining rows of a query is legacy behavior of the Illustra product. Therefore, the DataBlade API continues to support this aspect of mi_query_finish() for backward compatibility with Illustra applications. However, new DataBlade API modules can still use mi_query_finish() to release implicitly allocated resources.

The mi_query_interrupt() function does not affect prepared statements or calls to DataBlade API file-access functions. After mi_query_interrupt() executes, the next iteration of the mi_get_result() function returns a status of MI_NO_MORE_RESULTS.

Return Values

MI_OK indicates that the function was successful; the query was either successfully interrupted or had already completed.
MI_ERROR indicates that the function was not successful; an exception was encountered.

Related Topics

See the description of the mi_query_finish() function.


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