Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Handling IN OUT parameters in DB Tool Stored Procedure calls

Options
tcammans
tcammans 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: