1mysql_stmt_sqlstate(3) MariaDB Connector/C mysql_stmt_sqlstate(3)
2
3
4
5 Name
6 mysql_stmt_sqlstate - Returns SQLSTATE error from previous statement
7 operation.
8
9 Synopsis
10 #include <mysql.h>
11
12 const char * mysql_stmt_sqlstate(MYSQL_STMT * stmt);
13
14 Description
15 Returns a string containing the SQLSTATE error code for the most re‐
16 cently invoked prepared statement function that can succeed or fail.
17 ## Parameter * stmt - a statement handle, which was previously allocat‐
18 ed by mysql_stmt_init(3). ## Return value Returns a 5 digit error
19 code. `00000' means no error. The values are specified by ANSI SQL
20 and ODBC.
21
22 Notes
23 Please note that not all client library error codes are mapped to SQL‐
24 STATE errors. Errors which can’t be mapped will returned as value
25 HY000.
26
27 See Also
28 • mysql_stmt_errno(3)
29
30 • mysql_stmt_error(3)
31
32
33
34Version 3.3.1 mysql_stmt_sqlstate(3)