I am calling an Oracle stored procedure from java and need to retrieve the numeric value returned as an OUT parameter..
I'm trying something like this. What am I missing?
Code:
PROCEDURE myproc (n_retval OUT NUMBER)
I'm trying something like this. What am I missing?
Code:
cstmt = gps.prepareCall("{ call myproc(?)}");
cstmt.registerOutParameter(1, OracleTypes.NUMBER);
cstmt.execute();
int n_ret = (int)oracle.sql.NUMBER(cstmt.getObject(1));