"Hammonds, Nicholas" <[EMAIL PROTECTED]> writes:
> Hi,
> I'm creating a stored derby with the following code
>
> ======
> String sql =
> "CREATE PROCEDURE testproc(" +
> "IN S_YEAR INTEGER, OUT RETTOT INTEGER) " +
> "PARAMETER STYLE JAVA CONTAINS SQL LANGUAGE JAVA
> EXTERNAL NAME " +
> "'net.thus.unittest.StoredProcStuff.javaTestProc'";
>
>
> Statement stat = con.createStatement();
> stat.execute(sql);
>
> ========
>
> The matching java method
>
> =========
> public static void javaTestProc(int a, int[] b ) {
> System.out.println("paramOne is " + a);
> }
> ==========
>
> I can call the procedure fine and see that I am able to pass the
> parameter in, although I don't have a clue how to get a return value
> out.
Hi Nicholas,
To get the return value out, you'll need to assign a value to b[0], like
this:
b[0] = 42;
--
Knut Anders