I tried to connect C++ to MySql and I just can\'t get this to work properly. I used latest MySql and C++/Connector for Windows from Oracle site. I also use VS2010.
The code below worked for me:
sql::ResultSet *res; res->getString("Column name").c_str();
Just using res->getString("Column name") was crashing my application.
using res->getString("Column name")