如果你用的是JDBC2
那么就这样吧
rs.last();
if( rs.getRow() == 0 ){
  ...............

解决方案 »

  1.   

    if(rs.next()){
    //有记录
    }else{
    //没记录
    }
      

  2.   

    if (rs!=null)
    {
     while(rs.next())
     {
      }
    }
      

  3.   

    举个例 子rs = dbc.executeQuery();
    if(!rs.next()){ 
    ismaster = false;
    }else{
    ismaster = true;
    }
    }catch(Exception e){
    System.err.println(e);
    通过rs.next()判断就可以实现啊,为空的话就无法next
      

  4.   

    你是指某个字段为空还是没有记录呢
    如果字段为空:wasnull()可以判断,还可以用getObject()==null判断
    如果没有记录:上面讲了
      

  5.   

    if(rs.next()){
        有数据;
    }else{
        无数据;
    }
      

  6.   

    哦~~~谢谢各位~~~~~~:)!~~~那么还有一个小问题:)~~~~在这里~~http://expert.csdn.net/Expert/topic/1987/1987171.xml?temp=.2292139谢谢大家~~