【发布时间】:2012-01-07 16:48:33
【问题描述】:
我使用了ResultSet,它返回一定数量的行。我的代码是这样的:
ResultSet res = getData();
if(!res.next())
{
System.out.println("No Data Found");
}
while(res.next())
{
// code to display the data in the table.
}
有什么方法可以检查ResultSet返回的行数吗?还是我必须自己写?
【问题讨论】: