用数据库中的列名试试~~rs.getString(列名)~~什么类型自己看看吧~~

解决方案 »

  1.   

    select count(*) from customer where companyid=?
    改为
    select count(*) as ct from customer where companyid=?"; int a = rs.getInt("ct")
      

  2.   

    getInt("字段名")
      

  3.   


    rs.getInt(0);应该可以取的到 
      

  4.   

    1.你的Connection connection = new Connection();我不明白什么意思.
    应该是:
          Class.forName(className).newInstance();
         conn = DriverManager.getConnection(url, userName, password);
      

  5.   

    原因都不对 
    刚才试出来了 
    是差一句话吧:re.next();
    加了之后可以取到,
    getInt(列号) getInt("列名")都无所谓不过还是谢谢大家