db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Boynes <jboy...@gluecode.com>
Subject How to return null param from a stored procedure?
Date Sun, 03 Oct 2004 01:34:13 GMT
I have a stored procedure where I want to return a null value from one 
its parameters - something like:

     public static void Int_Proc2(Integer[] param) {
         param[0] = null;
     }

I am declaring this to Derby as:
   CREATE PROCEDURE Int_Proc2(OUT param INTEGER)
   PARAMETER STYLE JAVA
   LANGUAGE JAVA
   READS SQL DATA
   EXTERNAL NAME 'test.jdbc.CallableStatementTest.Int_Proc2'

but a prepareCall("{call Int_Proc2(?)}");
throws a 42X50 SQLException (no method found ...)

Using a primitive int works fine but obviously I can't return null that 
way. How should I be doing this?

Thanks
--
Jeremy

Mime
View raw message