Mirek Cervenka <[EMAIL PROTECTED]> writes:

> 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();
>         }
>         
>         try {
>             Connection c = null;
>             try {
>                 String dbUser = "blabla";
>                 String dbPassword = "blabla";
>                 c = 
> DriverManager.getConnection("jdbc:derby://localhost:1527/myTestDatabase", 
> dbUser, dbPassword);

Hi Mirek,

A stored procedure should use "jdbc:default:connection" as URL. The
rest of the code looks correct.

-- 
Knut Anders

Reply via email to