Oracle 5.0 Reference Manual page 2225

Table of Contents

Advertisement

Description
For the statement specified by stmt,
containing the error message for the most recently invoked statement API function that can succeed
or fail. An empty string ("") is returned if no error occurred. This means the following two tests are
equivalent:
if(*mysql_stmt_errno(stmt))
{
// an error occurred
}
if (mysql_stmt_error(stmt)[0])
{
// an error occurred
}
The language of the client error messages may be changed by recompiling the MySQL client library.
Currently, you can choose error messages in several different languages.
Return Values
A character string that describes the error. An empty string if no error occurred.
Errors
None.
20.6.10.10.
mysql_stmt_execute()
int mysql_stmt_execute(MYSQL_STMT *stmt)
Description
mysql_stmt_execute()
currently bound parameter marker values are sent to server during this call, and the server replaces the
markers with this newly supplied data.
Statement processing following
• For an UPDATE, DELETE, or INSERT, the number of changed, deleted, or inserted rows can be found
by calling mysql_stmt_affected_rows().
• For a statement such as
to fetch the data prior to calling any other functions that result in query processing. For more
information on how to fetch the results, refer to
Do not following invocation of
or mysql_use_result(). Those functions are not intended for processing results from prepared
statements.
For statements that generate a result set, you can request that
cursor for the statement by calling
execute a statement multiple times,
a new one.
Return Values
Zero if execution was successful. Nonzero if an error occurred.
Errors
CR_COMMANDS_OUT_OF_SYNC
Commands were executed in an improper order.
C API Prepared Statement Function Descriptions
mysql_stmt_error()
executes the prepared query associated with the statement handle. The
mysql_stmt_execute()
that generates a result set, you must call
SELECT
mysql_stmt_execute()
mysql_stmt_attr_set()
mysql_stmt_execute()
[2942]
2205
returns a null-terminated string
depends on the type of statement:
Section 20.6.10.11,
"mysql_stmt_fetch()".
with a call to
mysql_stmt_execute()
before executing the statement. If you
closes any open cursor before opening
mysql_stmt_fetch()
mysql_store_result()
open a

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents