Subject Re: firebird stored procedure for calling java program.
Author hanif.sayyad
Hi Evgeny Putilin,

Thanks for reply. I want to call java program from stored prcedure or trigger. I am using firebird 2.1.3, is this alpha version? if yes then can you please guide me with example.


CREATE PROCEDURE add_emp (
senderid NUMBER, recepientno NUMBER, mes VARCHAR2)
AS LANGUAGE JAVA
NAME 'DBTrigger.addEmp(int, int, java.lang.String)';

when i am executing this query getting below error.

Engine Error (code = 335544569):
Dynamic SQL Error.
SQL error code = -104.
Token unknown - line 3, column 4.
LANGUAGE.

SQL Error (code = -104):
Invalid token.

Please guide me.

Thanks & Regards,
Hanif
--- In Firebird-Java@yahoogroups.com, Evgeny Putilin <evgeneyputilin@...> wrote:
>
> Hi Hanif
> >
> > Hi friends,
> >
> > I am new to firebird.I need to know how to configure Firebird server? so i can
> > execute stored procedure which calls java program. Its very urgent for me.
> > Please help me ASAP.
> >
> > Thanks& Regards,
> > Hanif
>
> What are you want: call Stored procedure from Java code, or call java code from stored procedure or trigger?
> 1. For call stored procedure from Java code you can use query:
> Statement st;
> st.executeQuery("select * from MySP('param1',123)"
> 2. For call Java code from stored procedure or trigger you should use RedDB(see www.red-soft.biz), or alpha version of Firebird 3.
>
> WBR Evgeny Putilin
>