db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@apache.org>
Subject Re: Result set as a return value of a Java stored procedure
Date Tue, 16 Jan 2007 14:56:26 GMT
Mirek Cervenka wrote:
> Hello,
> 
> I have a following problem. I want to return a result set as a 
> consequence of some processing by a Java stored procedure on Apache 
> Derby DB, however, I am still getting a NULL resultset. Could anyone 
> help me please? I would be very grateful!
> 
> Here is the code. Registration of the stored procedure is as follows:
> 
> CREATE PROCEDURE myTestProcedure() LANGUAGE JAVA PARAMETER STYLE JAVA 
> CONTAINS SQL DYNAMIC RESULT SETS 1 EXTERNAL NAME 
> 'StoredProcedures.myTestProcedure'
> 
> The actual implementation of the stored procedure is:
> 
>     public static void myTestProcedure(ResultSet[] rs) {
>         try {
>             
> Class.forName("org.apache.derby.jdbc.ClientDriver").newInstance();
>         } catch (Exception ex) {
>             ex.printStackTrace();
>         }

There's no need to load any JDBC driver in a server side procedure.

You may find this wiki page useful:

http://wiki.apache.org/db-derby/DerbySQLroutines

Dan.


Mime
View raw message