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

mi_exec()

The mi_exec() function sends an SQL statement through a given connection.

Syntax

Usage

If the SQL statement is not SELECT, the statement is executed. If it is SELECT, a cursor is opened on the result set.

The mi_exec() function only sends the statement; it does not return results to the application. To get results after the execution mi_exec(), the application must examine the results via a loop using mi_get_result().

The current statement must finish before the database server can process the next statement. The mi_query_finish() function can be used to force a statement to finish processing. Informix strongly advises that you use either mi_query_finish() or an mi_get_result() loop after each mi_exec() function.

For general information about sending statements with mi_exec(), see "Sending SQL Statements".

A successful return indicates only that the connection is valid and the statement was successfully executed (for statements other than SELECT) or a cursor was successfully opened (for SELECT).

Return Values

MI_OK

The function was successful.

MI_ERROR

The function was not successful.

Related Topics

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




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