String sql = "BEGIN xx_custom_pkg.custom_prc (:1,:2); END;";
try {
OracleCallableStatement cs =
(OracleCallableStatement)oam.getOADBTransaction().createCallableStatement(sql,
2);
((OracleCallableStatement)cs.registerOutParameter(2,
Types.VARCHAR,
0, 2000));
cs.setString(1, xxAttribute1Value);
cs.execute();
String outParamValue = cs.getString(1);
pageContext.writeDiagnostics(this,
"Result is:" + outParamValue,
OAFwkConstants.PROCEDURE);
cs.close();
} catch (Exception ex) {
pageContext.writeDiagnostics(this, "Error:" + ex.toString(),
OAFwkConstants.PROCEDURE);
}
try {
OracleCallableStatement cs =
(OracleCallableStatement)oam.getOADBTransaction().createCallableStatement(sql,
2);
((OracleCallableStatement)cs.registerOutParameter(2,
Types.VARCHAR,
0, 2000));
cs.setString(1, xxAttribute1Value);
cs.execute();
String outParamValue = cs.getString(1);
pageContext.writeDiagnostics(this,
"Result is:" + outParamValue,
OAFwkConstants.PROCEDURE);
cs.close();
} catch (Exception ex) {
pageContext.writeDiagnostics(this, "Error:" + ex.toString(),
OAFwkConstants.PROCEDURE);
}
No comments:
Post a Comment