ResultSet sc=cs.executequery();
if (sc==null)
{
....
}

解决方案 »

  1.   

    1.无参数调用方式
    //Storeprocedure 为存储过程名
    CallabelStatement cstm = con.prepareCall("{call Storeprocedure()}");
    ResultSet rs = cstm.executeQuery();2.有参数调用方式//Storeprocedure 为存储过程名
    CallabelStatement cstm = con.prepareCall("{call Storeprocedure(?,?)}");
    //登记输出参数,根据参数类型不同而改变java.sql.Types的值
    cstm.registerOutParameter(1,java.sql.Types.TINYINT);
    cstm.registerOutParameter(2,java.sql.Types.DECIMAL,2);
    //执行
    cstm.executeUpdate();
    //获取输出参数的值
    byte x = cstm.getByte(1);
    Numeric n = cstm.getNumeric(2,2);
      

  2.   

    哦,我说错了,应该是怎么调用sqlserver2000的系统存储过程