int num = 0;
CallableStatement cStmt = null;
cStmt = con.prepareCall("{call MYPACKAGE.MYPROCEDURE(?)}");
cStmt.registerOutParameter(1, OracleTypes.NUMERIC)
cStmt.execute();
num=cStmt.getInt(1);
Get exception like below :
java.sql.SQLException: ORA-06550: line 1, column 7:After headache for hours, then I saw the light. CREATE SYNONYM,GRANT ACCESS for that package!
PLS-00201: identifier 'MYPACKAGE.MYPROCEDURE' must be declared
CREATE OR REPLACE PUBLIC SYNONYM MYPACKAGE FOR MYPACKAGE;The error went pooofff away. Always forget about basic thing!
GRANT EXECUTE ON MYPACKAGE TO USERNAME;
No comments:
Post a Comment