I am simply trying to call a stored procedure that takes one parameter and returns a result set of 2 colums both of which are varchars. This is my code:
When I run this I get: java.sql.SQLException: ORA-01006: bind variable does not exist.
If I take away the last two registerOutParameter calls I get there error: java.sql.SQLException: ORA-00900: invalid SQL statement
After searching on the internet I don't see complete consistency on how to do this - I guess one question is in terms of the output -- In theory -- since I am going to get one resultSet with 2 columns of values what do I need to 'registerOutParameter' all 3 or just the resultSet or what?
Hello, The binding error is because of line 3 and 4. There no Parameters numbered 3 and 4 as we can make out from the CallableStatement you are preparing. You get the resultset and then iterate over it to retrieve the VARCHAR values inside it.
You also need to change
regards, Amit
Regards,
Amit
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: calling stored proc. w/ resultset return?