我目前正在使用以下方式从准备好的语句访问结果集的内容std::stringSQL="....";prep_stmt=con->prepareStatement(SQL);res=prep_stmt->executeQuery();if(res->next())//Ifobjectexists{res->getString("ColumnName");//Accessthecontentofacolumn}有没有办法让我在res->next()之前提前访问结果集中的行 最佳答案 试试rowsCount()方法coutrowsCount