Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Return Value from Stored Procedure with Named Parameters

651107Jul 21 2008 — edited Jan 20 2015
Hi!

I scanned now for hours this forum, but i didn't get an answer. I would like to call a stored procedure with return value with jdbc. Caused by default values in my stored procedure I have to use named parameters.
The Problem is how to register this return value correctly with jdbc.
OracleCallableStatement oracall = (OracleCallableStatement) con.prepareCall("? = call mytest1(?); end;");
oracall.setString("test1", "Test");
oracall.registerOutParameter(1,Types.INTEGER);
oracall.execute();
This didn't worked cause of mixed registration of parameters.

I tried now to bind the parameters, but this wasn't successful!

Has anyone a solution fot this problem? In all other threads the solutions didn't work fine or were inadequately.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 21 2008
Added on Jul 21 2008
2 comments
4,324 views