MySQL Query executes but throws exception

后端 未结 3 580

My code:

try {
    sql::Driver *driver;
    sql::Connection *con;
    sql::Statement *stmt;

    /* Create a connection */
    driver = get_driver_instance()         


        
3条回答
  •  遥遥无期
    2021-01-11 19:50

    From MySQL Reference -- 13.6.7.2 DECLARE ... HANDLER Syntax:

    An SQLSTATE value (a 5-character string literal) or a MySQL error code (a number). You should not use SQLSTATE value '00000' or MySQL error code 0, because those indicate success rather than an error condition. For a list of SQLSTATE values and MySQL error codes, see Section C.3, “Server Error Codes and Messages”.

提交回复
热议问题