Oracle 5.0 Reference Manual page 2236

Table of Contents

Advertisement

The application can include one or more parameter markers in the SQL statement by embedding
question mark (?) characters into the SQL string at the appropriate positions.
The markers are legal only in certain places in SQL statements. For example, they are permitted in
the
VALUES()
with a column in a
identifiers (such as table or column names), or to specify both operands of a binary operator such
as the
equal sign. The latter restriction is necessary because it would be impossible to determine
=
the parameter type. In general, parameters are legal only in Data Manipulation Language (DML)
statements, and not in Data Definition Language (DDL) statements.
The parameter markers must be bound to application variables using
before executing the statement.
Return Values
Zero if the statement was prepared successfully. Nonzero if an error occurred.
Errors
CR_COMMANDS_OUT_OF_SYNC
Commands were executed in an improper order.
CR_OUT_OF_MEMORY
Out of memory.
CR_SERVER_GONE_ERROR
The MySQL server has gone away.
CR_SERVER_LOST
The connection to the server was lost during the query
CR_UNKNOWN_ERROR
An unknown error occurred.
If the prepare operation was unsuccessful (that is,
error message can be obtained by calling mysql_stmt_error().
Example
See the Example in
20.6.10.21.
mysql_stmt_reset()
my_bool mysql_stmt_reset(MYSQL_STMT *stmt)
Description
Resets a prepared statement on client and server to state after prepare. It resets the statement on the
server, data sent using mysql_stmt_send_long_data(), unbuffered result sets and current errors.
It does not clear bindings or stored result sets. Stored result sets will be cleared when executing the
prepared statement (or closing it).
To re-prepare the statement with another query, use mysql_stmt_prepare().
Return Values
Zero if the statement was reset successfully. Nonzero if an error occurred.
C API Prepared Statement Function Descriptions
list of an
statement (to specify column values for a row), or in a comparison
INSERT
clause to specify a comparison value. However, they are not permitted for
WHERE
[2942]
[2942]
[2942]
[2942]
[2941]
Section 20.6.10.10,
mysql_stmt_prepare()
"mysql_stmt_execute()".
2216
mysql_stmt_bind_param()
returns nonzero), the

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents