proc.registerOutParameter(1, Types.OTHER);
确定不了输出参数类型?
有些JDBC是不支持OTHER类型的,最好使用对应的类型

解决方案 »

  1.   

    下面是调用存储过程的一段代码,不知道对你有没有用:   
     Connection conn = null;
        ResultSet rs = null;
        int result = 0;    conn = acx.getConnection();    try {
          CallableStatement proc = conn.prepareCall(
              "{call PRC_2502_AUCTION_ARTICLE_ADD(?, ?, ?, ?, ?, ?, ?, ?, ?) }");
          proc.setString(1, article.getArticle_id());
          proc.setString(2, article.getArticle_name());
          proc.setString(3, article.getArticle_model());
          proc.setString(4, article.getArticle_price());
          proc.setString(5, article.getMax_bid_price());
          proc.setString(6, article.getMin_bid_price());
          proc.setString(7, article.getBegin_time());
          proc.setString(8, article.getEnd_time());
          proc.registerOutParameter(9, Types.INTEGER);      proc.execute();
          int ret = proc.getInt(9);
          System.out.print("The return of addArticle() is " + ret);
          return ret; //0-³É¹¦, 1-ʧ°Ü