Subject Re: [Firebird-Java] Creating procedures through java executeQuery()
Author Евгений Путилин
Hi advis
>
> I am trying to create a procedure in an empty Firebird database
> through my java client.
>
> I would like my java program to be able to create new procedures in a
> Firebird database.
>
> I've successfully used Statement.executeQuery() to create tables and
> generators, but am having difficulty creating procedures.
>
> For instance,
>
> I would like to add the following procedure to my database, through my
> java client:
>
> SET TERM !! ;
This command is isql feature. Its needed for split SQL operator. For java client it not need.
> CREATE PROCEDURE getServerName RETURNS (name VARCHAR(100)) AS
> BEGIN
> SELECT name FROM SERVER INTO :name;
> END!!
>
> SET TERM ; !!
Please use
String sql=" CREATE PROCEDURE getServerName RETURNS (name VARCHAR(100)) AS"+
" BEGIN"+
" SELECT name FROM SERVER INTO :name;"+
" END";

WBR Eugeney Putilin.