C API Prepared Statement Function Descriptions
2204
If the current statement has pending or unread results, this function cancels them so that the next
query can be executed.
Return Values
Zero if the statement was freed successfully. Nonzero if an error occurred.
Errors
•
CR_SERVER_GONE_ERROR
[2942]
The MySQL server has gone away.
•
CR_UNKNOWN_ERROR
[2941]
An unknown error occurred.
Example
See the Example in
Section 20.6.10.10, “
mysql_stmt_execute()
”
.
20.6.10.7.
mysql_stmt_data_seek()
void mysql_stmt_data_seek(MYSQL_STMT *stmt, my_ulonglong offset)
Description
Seeks to an arbitrary row in a statement result set. The
offset
value is a row number and should be
in the range from
0
to
mysql_stmt_num_rows(stmt)-1
.
This function requires that the statement result set structure contains the entire result of the
last executed query, so
mysql_stmt_data_seek()
may be used only in conjunction with
mysql_stmt_store_result()
.
Return Values
None.
Errors
None.
20.6.10.8.
mysql_stmt_errno()
unsigned int mysql_stmt_errno(MYSQL_STMT *stmt)
Description
For the statement specified by
stmt
,
mysql_stmt_errno()
returns the error code for the most
recently invoked statement API function that can succeed or fail. A return value of zero means that no
error occurred. Client error message numbers are listed in the MySQL
errmsg.h
header file. Server
error message numbers are listed in
mysqld_error.h
. Errors also are listed at
Appendix C, Errors,
Error Codes, and Common Problems
.
Return Values
An error code value. Zero if no error occurred.
Errors
None.
20.6.10.9.
mysql_stmt_error()
const char *mysql_stmt_error(MYSQL_STMT *stmt)
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...