Help Call Stored Procedure

ajitm <[email protected]>
Newsgroups gmane.comp.java.hsqldb.user
Message-ID <[email protected]>
Hello
I am using HSQL as in-memory db for unit testing SQL server stored procedure
(SP). Implementation is in Java using JDBC as below:

conn.prepareCall("{?=call spName (?)}");
stmt.registerOutParameter(1, Types.INTEGER);
stmt.setInt(2, contract.getACESMemberId());
stmt.execute();
stmt.getInt(1);

Above Java lines invoke SP deployed on sql server db. As you see there is
one procedure parameter and one return value. SP defn in sql server will be
something like - spName(integer p1).

When i mimic spName in HSQLDB with just one input parameter, then
registerOutParameter line (above) fails. When I define HSQLDB SP with 2
parameters one OUT and other IN then I get "user object not found" because
spName in sql server accepts 1 parameter where-as one in HSQLDB accepts two
parameters.

Whether I try alias or plan SQL stored procedure or Java stored procedure, I
am stuck at same above behavior. 

It seems "?=call" behavior is diff for HSQLDB JDBC driver than other DB
drivers (SQL server or Oracle that I know).

Appreciate if forum provide can some directions. 
Changing existing code for unit testing is not a viable option as that will
involve large testing cycle.

Regards.






------------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.