Oracle 5.0 Reference Manual page 2240

Table of Contents

Advertisement

bind[0].length= &length;
bind[0].is_null= 0;
/* Bind the buffers */
if (mysql_stmt_bind_param(stmt, bind))
{
fprintf(stderr, "\n param bind failed");
fprintf(stderr, "\n %s", mysql_stmt_error(stmt));
exit(0);
}
/* Supply data in chunks to server */
if (mysql_stmt_send_long_data(stmt,0,"MySQL",5))
{
fprintf(stderr, "\n send_long_data failed");
fprintf(stderr, "\n %s", mysql_stmt_error(stmt));
exit(0);
}
/* Supply the next piece of data */
if (mysql_stmt_send_long_data(stmt,0,
{
fprintf(stderr, "\n send_long_data failed");
fprintf(stderr, "\n %s", mysql_stmt_error(stmt));
exit(0);
}
/* Now, execute the query */
if (mysql_stmt_execute(stmt))
{
fprintf(stderr, "\n mysql_stmt_execute failed");
fprintf(stderr, "\n %s", mysql_stmt_error(stmt));
exit(0);
}
20.6.10.26.
mysql_stmt_sqlstate()
const char *mysql_stmt_sqlstate(MYSQL_STMT *stmt)
Description
For the statement specified by stmt,
containing the SQLSTATE error code for the most recently invoked prepared statement API function
that can succeed or fail. The error code consists of five characters.
values are specified by ANSI SQL and ODBC. For a list of possible values, see
Error Codes, and Common
Note that not all MySQL errors are yet mapped to SQLSTATE codes. The value
error) is used for unmapped errors.
Return Values
A null-terminated character string containing the SQLSTATE error code.
20.6.10.27.
mysql_stmt_store_result()
int mysql_stmt_store_result(MYSQL_STMT *stmt)
Description
Result sets are produced by calling
statements for SQL statements such as SELECT, SHOW, DESCRIBE, and EXPLAIN. By default,
result sets for successfully executed prepared statements are not buffered on the client and
mysql_stmt_fetch()
set to be buffered on the client, call
C API Prepared Statement Function Descriptions
" - The most popular Open Source database",40))
Problems.
fetches them one at a time from the server. To cause the complete result
mysql_stmt_sqlstate()
mysql_stmt_execute()
mysql_stmt_store_result()
2220
returns a null-terminated string
means "no error." The
"00000"
Appendix C, Errors,
"HY000"
to executed prepared
after binding data buffers with
(general

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents