alnasl
asked on
Error: PLS-00306: wrong number or types of arguments in call to '' when executing pl/sql function from java
Hi!
I have the following problem. I am calling a pl/sql function from a JavaBean. The pl/sql function works perfectly, but when I call the bean, I get the error
Error executing statement: java.sql.SQLException: ORA-06550: line 1, column 13:
PLS-00306: wrong number or types of arguments in call to 'RETRIEVE_TECH_ID'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Here's the code that causes the error:
-------------------------- ---------- ---------- ---------- ---------- -
qryStechsIDs = "begin ? := retrieve_tech_id(?, ?); end;";
cs = con.getConnection().prepar eCall(qryS techsIDs);
cs.setString(1, rs.getString("RSLT_TABLE_N AME"));
cs.setInt(2, rs.getInt("RSLT_PK"));
cs.registerOutParameter(3, OracleTypes.CURSOR);
-------------------------- ---------- ---------- ---------- ----------
The pl/sql function gets 2 parameters: VARCHAR2 and NUMBER and returns a Cursor. I suppose that the problem is in the data type of the input parameters, but I just can't sort it out. So, how can I get rid of the stupid error?
Thanks for the help in advance!
BR,
al
I have the following problem. I am calling a pl/sql function from a JavaBean. The pl/sql function works perfectly, but when I call the bean, I get the error
Error executing statement: java.sql.SQLException: ORA-06550: line 1, column 13:
PLS-00306: wrong number or types of arguments in call to 'RETRIEVE_TECH_ID'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Here's the code that causes the error:
--------------------------
qryStechsIDs = "begin ? := retrieve_tech_id(?, ?); end;";
cs = con.getConnection().prepar
cs.setString(1, rs.getString("RSLT_TABLE_N
cs.setInt(2, rs.getInt("RSLT_PK"));
cs.registerOutParameter(3,
--------------------------
The pl/sql function gets 2 parameters: VARCHAR2 and NUMBER and returns a Cursor. I suppose that the problem is in the data type of the input parameters, but I just can't sort it out. So, how can I get rid of the stupid error?
Thanks for the help in advance!
BR,
al
You have three bind variables in the statement but you only set two
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
OK