MySQL Forums
Forum List  »  Connector/C++

Returning 2147483647 and not displaying exception error.
Posted by: Ashton Cummings
Date: July 01, 2009 02:42PM

This function within my code keeps throwing a SQL exception but not showing any error code or error... here is the exception:

# ERR: (MySQL error code: 0, SQLState: 00000 )

The function will keep running past that point but it will return the value "2147483647" or "3219256152". I realize that is the max value for a 32 bit INT. What could be the issue here, does anyone have suggestions?

Here is the function:

unsigned long Reporter::mkNlineRtestId()
unsigned long ret=0;
auto_ptr<sql::Connection> con;
con.reset(driver->connect(serverAddr.c_str(), userName.c_str(), password.c_str()));
auto_ptr<sql::Statement> stmt;
string query="INSERT INTO " + table_testsummary + " (testId, submitTime) VALUES(NULL, NOW());SELECT LAST_INSERT_ID() AS currId;";
auto_ptr<sql::ResultSet> result;
return ret;

Edited 1 time(s). Last edit at 07/01/2009 02:44PM by Ashton Cummings.

Options: ReplyQuote

Written By
Returning 2147483647 and not displaying exception error.
July 01, 2009 02:42PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.