(mysql.info.gz) mysql_stmt_store_result
Info Catalog
(mysql.info.gz) mysql_stmt_sqlstate
(mysql.info.gz) C API Prepared statement functions
22.2.7.27 `mysql_stmt_store_result()'
.....................................
`int mysql_stmt_store_result(MYSQL_STMT *stmt)'
Description
...........
You must call `mysql_stmt_store_result()' for every statement that
successfully produces a result set (`SELECT', `SHOW', `DESCRIBE',
`EXPLAIN'), and only if you want to buffer the complete result set by
the client, so that the subsequent `mysql_stmt_fetch()' call returns
buffered data.
It is unnecessary to call `mysql_stmt_store_result()' for other
statements, but if you do, it will not harm or cause any notable
performance problem. You can detect whether the statement produced a
result set by checking if `mysql_stmt_result_metadata()' returns `NULL'.
For more information, refer to `mysql_stmt_result_metadata()'
mysql_stmt_result_metadata.
all columns in `mysql_stmt_store_result()' because calculating this
would slow down `mysql_stmt_store_result()' considerably and most
applications doesn't need `max_length'. If you want `max_length' to be
updated, you can call `mysql_stmt_attr_set(MYSQL_STMT,
STMT_ATTR_UPDATE_MAX_LENGTH, &flag)' to enable this.
mysql_stmt_attr_set.
This function was added in MySQL 4.1.0.
Return Values
.............
Zero if the results are buffered successfully. Non-zero 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.
Info Catalog
(mysql.info.gz) mysql_stmt_sqlstate
(mysql.info.gz) C API Prepared statement functions
automatically generated byinfo2html