Oracle 5.0 Reference Manual page 2223

Table of Contents

Advertisement

Example
See the Example in
20.6.10.5.
mysql_stmt_bind_result()
my_bool mysql_stmt_bind_result(MYSQL_STMT *stmt, MYSQL_BIND *bind)
Description
mysql_stmt_bind_result()
to data buffers and length buffers. When
client/server protocol places the data for the bound columns into the specified buffers.
All columns must be bound to buffers prior to calling mysql_stmt_fetch().
address of an array of
element for each column of the result set. If you do not bind columns to
mysql_stmt_fetch()
data values, because the protocol doesn't return data values in chunks.
A column can be bound or rebound at any time, even after a result set has been partially retrieved.
The new binding takes effect the next time
application binds the columns in a result set and calls mysql_stmt_fetch(). The client/server
protocol returns data in the bound buffers. Then suppose that the application binds the columns to a
different set of buffers. The protocol places data into the newly bound buffers when the next call to
mysql_stmt_fetch()
To bind a column, an application calls
and length of the output buffer into which the value should be stored.
Statement Data
should be set to receive output values.
Return Values
Zero if the bind operation was successful. Nonzero if an error occurred.
Errors
CR_UNSUPPORTED_PARAM_TYPE
The conversion is not supported. Possibly the
supported types.
CR_OUT_OF_MEMORY
Out of memory.
CR_UNKNOWN_ERROR
An unknown error occurred.
Example
See the Example in
20.6.10.6.
mysql_stmt_close()
my_bool mysql_stmt_close(MYSQL_STMT *)
Description
Closes the prepared statement.
to by stmt.
C API Prepared Statement Function Descriptions
Section 20.6.10.10,
is used to associate (that is, bind) output columns in the result set
structures. The client library expects the array to contain one
MYSQL_BIND
simply ignores the data fetch. The buffers should be large enough to hold the
occurs.
mysql_stmt_bind_result()
Structures", describes the members of each
[2944]
[2942]
[2941]
Section 20.6.10.11,
mysql_stmt_close()
"mysql_stmt_execute()".
mysql_stmt_fetch()
mysql_stmt_fetch()
MYSQL_BIND
buffer_type
"mysql_stmt_fetch()".
also deallocates the statement handle pointed
2203
is called to fetch data, the MySQL
is the
bind
structures,
MYSQL_BIND
is called. Suppose that an
and passes the type, address,
Section 20.6.8, "C API Prepared
element and how they
value is illegal or is not one of the

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents