如何获得查询执行的结果-- select count (*) from myTable?代码是:
...
oc::Statement* stmt =
m_cConnection->createStatement(select count (*) from myTable);
oc::ResultSet* res = stmt->executeQuery();
...如何在res中获取行数的值
发布于 2014-07-10 16:43:32
只需写
cout << res->getString(1) << endl;或
cout << "\t... MySQL counts: " << res->getInt(1) << endl;https://stackoverflow.com/questions/24671805
复制相似问题