I do have a feeling that I am suppose to be dealing with result sets
and have completely missed that. I am sure, without even trying, that
the example I posted would work as a function. Doh. I think I am
getting on the right track now.
On Jan 24, 2008 3:57 PM, Briggs <[EMAIL PROTECTED]> wrote:
> I'm having a bit of a problem installing a java procedure in derby
> (10.3). I thought I understood what I could do with them but now...
>
> I have created a simple "hello world" procedure:
>
> --------------
>
> package derby.proc;
>
> public class HelloWorldProcedure {
> public static String helloWorld(final String name) {
> return "hello " + name;
> }
> }
>
> --------------
>
> Then created a jar file called DerbyProcs.jar in my temp directory
> (with the above class).
>
> Then I run the following commands:
>
> CALL SQLJ.install_jar('c:\tmp\DerbyProcs.jar', 'APP.DERBY_PROCS', 0);
>
> CALL
> SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.database.classpath','APP.DERBY_PROCS');
>
> CREATE PROCEDURE APP.HELLO_WORLD(
> IN NAME VARCHAR(20),
> OUT HELLO_YOU VARCHAR(30)
> )
> PARAMETER STYLE JAVA
> READS SQL DATA
> LANGUAGE JAVA
> EXTERNAL NAME 'derby.proc.HelloWorldProcedure.helloWorld';
>
>
> -- CALL THE PROC
>
> CALL APP.HELLO_WORLD('world');
>
>
> The result I get is:
>
> Error code 30000, SQL state 42Y03: 'APP.HELLO_WORLD' is not recognized
> as a function or procedure.
> Line 13, column 1
>
>
> What am I missing? Am I wrong on what I am expecting to happen?
>
> Thanks for your time,
>
> Briggs.
>
> --
> "Conscious decisions by conscious minds are what make reality real"
>
--
"Conscious decisions by conscious minds are what make reality real"