跟没有包类似,只需在存储名前加上包名就行了
Package.procedureName比如著名的PLog包,
可以这样调用PLog.debug(),  PLog.info()  ,PLog,error() ......

解决方案 »

  1.   

    基本差不多。
    CallableStatement callFunction = connection.prepareCall(
                        "{ ? = call PKG_ZXSB.P_ZXSB_SKSSQ(?,?) }");PKG_ZXSB为包名,P_ZXSB_SKSSQ为存储过程名。
      

  2.   

    (
     i_id_number IN varchar2,
     i_card_id IN varchar2,
     o_customer_id_and_passwd OUT VARCHAR2
    )
       IS
        BEGIN
         SELECT l.customer_id||'&'||l.password  INTO o_customer_id_and_passwd
           FROM ecc_account_card a,ecc_card c,ecc_customer_login l
          WHERE a.card_id = c.card_id
            AND a.card_id = i_card_id
            AND c.holder_id_num = i_id_number
             AND l.customer_id = a.customer_id
             AND a.status_id = '101';
        EXCEPTION
         WHEN OTHERS THEN
             RAISE;
    end;请问我的存储过程是这样的,怎么用CALLSTATEMENT??
      

  3.   

    CallableStatement callFunction = connection.prepareCall(
                        "{ call test(?,?) }");callFunction.setString(1,"paramerer1");
    callFunction.setString(1,"paramerer2");
    callFunction.registerOutParameter(1,OracleTypes.VARCHAR);
                    // execute the function and return the result
    callFunction.execute();
    String sbResult = callFunction.getString(3);
     System.out.println("处理结果:"+sbResult);;