MySQL Forums
Forum List  »  Connector/C++

SQLException by PreparedStatement::getMoreResults in example C++ code
Posted by: Shengsong Yang
Date: June 22, 2016 02:23AM

Hi all,

I got the following exception when running the example code here:
http://dev.mysql.com/doc/connector-cpp/en/connector-cpp-tutorials-stored-routines-prepared-statement-with-result.html

# ERR: SQLException in sp_scenario3.cpp(main) on line 70
# ERR: MySQL_Prepared_Statement::getMoreResults (MySQL error code: 0, SQLState: )


Here is the output generated by the example code:
Connector/C++ tutorial framework...

Name: Cocos (Keeling) Islands Population: 600
Name: Christmas Island Population: 2500
Name: Norfolk Island Population: 2000
Name: Niue Population: 2000
Name: Pitcairn Population: 50
Name: Tokelau Population: 2000
Name: United States Minor Outlying Islands Population: 0
# ERR: SQLException in sp_scenario3.cpp(main) on line 70
# ERR: MySQL_Prepared_Statement::getMoreResults (MySQL error code: 0, SQLState: )

It seems that the error was generated by calling pstmt->getMoreResults() in the if condition.

I'm running the packages on Ubuntu 14.04 LTS and the version of mysql connector/c++ is 1.0.2 according to Software Center. I'd really appreciate it if anyone could help!

Options: ReplyQuote


Subject
Views
Written By
Posted
SQLException by PreparedStatement::getMoreResults in example C++ code
814
June 22, 2016 02:23AM


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.