Subject | Creating procedures through java executeQuery() |
---|---|
Author | advis10 |
Post date | 2005-06-15T23:51:09Z |
Hi hi
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 !! ;
CREATE PROCEDURE getServerName RETURNS (name VARCHAR(100)) AS
BEGIN
SELECT name FROM SERVER INTO :name;
END!!
SET TERM ; !!
so I stuff this into a String and use Statement.executeQuery() but
Firebird gives me a
GDS Exception. 335544569. Dynamic SQL Error
SQL error code = -104
Token unknown - line 1, char 5
TERM
I have scoured the net for any documentation as to this issue but come
up with nothing.
I would be every so grateful if someone could provide me with some
source code as to add a stored procedure to the database via jdbc call.
Thanks a ton
Matt
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 !! ;
CREATE PROCEDURE getServerName RETURNS (name VARCHAR(100)) AS
BEGIN
SELECT name FROM SERVER INTO :name;
END!!
SET TERM ; !!
so I stuff this into a String and use Statement.executeQuery() but
Firebird gives me a
GDS Exception. 335544569. Dynamic SQL Error
SQL error code = -104
Token unknown - line 1, char 5
TERM
I have scoured the net for any documentation as to this issue but come
up with nothing.
I would be every so grateful if someone could provide me with some
source code as to add a stored procedure to the database via jdbc call.
Thanks a ton
Matt