Handling IN OUT parameters in DB Tool Stored Procedure calls

tcammanstcammans Posts: 3

I have a Oracle DB Stored Procedure with the following signature SCHEMA.PACKAGE.PROCEDURE(IN VARCHAR, IN VARCHAR, IN VARCHAR, IN OUT VARCHAR, OUT VARCHAR, OUT VARCHAR, OUT VARCHAR, OUT VARCHAR, OUT INTEGER, OUT VARCHAR).

As you can see, there is one parameter that is both an input AND output parameter.

I have tried configuring my DB tool with the following statement:
CALL SCHEMA.PACKAGE.PROCEDURE('VALUE1', 'VALUE2', NULL, 'VALUE3', ?, ?, ?, ?, ?, ?)
and, the following declared JDBC OUT parameter types for stored procedures:
VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, INTEGER, VARCHAR
but when executing I get the error "java.sql.SQLException: Invalid column index".

If I replace input 'VALUE3' with a '?' to denote it being an output then I cant pass in the value I need to and I get the error "java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'PROCEDURE'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored".

Does anyone know how to configure the DB Tool to accomodate a parameter that is both input and output?

Tagged:
Sign In or Register to comment.