Java调用Oracle存储Package

Oracle的包Package中可以有很多存储,可通过该包的总调入口在java中直接调用。

//java调用oracle的package代码
public boolean cal() throws java.lang.Exception {
          CallableStatement cstmt = null;
          String procedure = "{call G_IMPORT_CAL.g_entry(?,?,?) }";
          cstmt = conn.prepareCall(procedure);
          cstmt.setString(1,organkey);                   
          cstmt.setString(2,this.getT18_task_fac().getGranularity());        
          cstmt.setString(3,this.getT18_task_fac().getStatisticdate());
          cstmt.executeUpdate();
          cstmt.close();
        return true;
    }
    

 

posted @ 2015-03-15 21:49  wanghx  阅读(1153)  评论(0编辑  收藏  举报