MySql C++ connector getString() doesn't work correctly, while getInt works perfectly

后端 未结 4 2059
轻奢々
轻奢々 2021-01-20 04:18

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.

4条回答
  •  既然无缘
    2021-01-20 04:42

    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.

提交回复
热议问题