Try it with just a sp returning a value in a single output parameter.
Can you access parameters by name?
Can you get the return value?
Output parameters are actually input/output - maybe that makes a difference.
Try putting a set nocount on at the top of the sp - maybe the driver is trying to return the record count first.
I've never used JDBC, I work with ADO, however in ADO there are 2 types of output parameters adParamOutput and adParamInputOutput. When using stored procedures that have a column defined as OUTPUT I must use adParamInputOutput, even though I'm not inputting a value. I notice you have defined your parameter as 'registerOutParameter', does JDBC have a parameter type 'registerInOutParameter'?
Since you are using SQL Server (assuming), turn on SQL Profiler and capture the execution of the statement, you should see the '@entryid' argument defined with the OUTPUT statement, something like this:
declare @P4 int
exec constructEntry 1001, "xyz","abc", @P4 OUTPUT
I've solved the problem with OUT parameters !! This seems to be a problem with the ODBC stack of Microsoft !! Problem does not arise with other drivers !! This problem arises not only with the ODBC-JDBC driver but with apps like Visual Basic, VC++, etc with use MS ODBC stack !!
Do not return Resultsets with OUTPUT parameters !! This does not work. The solution is to split the stored procedures into two procedures, one returning the OUTPUT parameter (if required) and another returning the resultset. Another workaround would be to include the OUTPUT parameter as another Column in the Resultset !! MS ODBC, JDBC client drivers do NOT allow you to return OUTPUT parameters with resultsets !! If you return either one of them alone no problem comes !!
Hope this helps you people out there facing the same problem
>> Do not return Resultsets with OUTPUT parameters !! This does not work.
I'm afraid it does work with VB.
You do have to make sure that all recordsets have been returned to the client thyough - usually setting cursor location to client is enough.
It also has a habit of losing the parameter binding if you try to access them before the values are returned.
I had the exact problem and here's the solution =)
There is only one thing you need to fix in your code to make this work. Just change 'execute()' to 'executeUpdate()'. That's it. For some reason you can't get at your OUT parameters when using the 'execute()' method of a CallableStatement.