db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <Knut.Hat...@Sun.COM>
Subject Re: jdbc metadata getProcedures does not return newly created proc/funcs
Date Mon, 10 Sep 2007 07:33:10 GMT
Rick Hillegas <Richard.Hillegas@Sun.COM> writes:

> Hi Mike,
>
> Try passing in null as the catalog and schema arguments. The javadoc
> for DatabaseMetaData.getProcedures() is a little vague about this.

That shouldn't make any difference since Derby ignores the catalog
argument and replaces a null schema argument with "%". 

FWIW, I'm not able to reproduce the problem with the code attached to
the original message. That is, getProcedures("", "%", "%NO_ARGS")
returns the PROC_NO_ARGS procedure. (It does not return FUNC_NO_ARGS
since it's a function not a procedure. Use the JDBC 4.0 method
getFunctions() if you want functions to be returned.)

> Mike Norman wrote:
>> latest Derby:
>>   Apache Derby
>>   10.3.1.4 - (561794)
>>   Apache Derby Network Client JDBC Driver
>>   10.1.2.1

Do you see the same problem if you upgrade the network client driver to
10.3.1.4?

>> I created 2 very simple stored proc/funcs:
>>
>> package test;
>>
>> import java.sql.SQLException;
>>
>> public class SPHelper {
>>
>>     public static void ProcNoArgs() throws SQLException {
>>     }
>>        public static String FuncNoArgs() throws SQLException {
>>         return "gidday";
>>     }
>> } 
>>
>> CREATE PROCEDURE PROC_NO_ARGS() LANGUAGE JAVA EXTERNAL NAME
>> test.SPHelper.ProcNoArgs' PARAMETER STYLE JAVA
>> NO SQL;
>> CREATE FUNCTION FUNC_NO_ARGS() RETURNS VARCHAR(100)
>> LANGUAGE JAVA
>> EXTERNAL NAME 'test.SPHelper.FuncNoArgs'
>> PARAMETER STYLE JAVA
>> NO SQL
>> RETURNS NULL ON NULL INPUT;

Silly question, but you're sure that these statements were committed and
that it was the same database as the meta-data calls were performed on?

-- 
Knut Anders

Mime
View raw message