Subject | Create Procedure always fails! FB 1.5 JB 1.5.6 |
---|---|
Author | Jef Gearhart |
Post date | 2006-03-16T17:05:20Z |
I've searched long and hard, but nobody seems to have had the same
consistent difficulty with creating a simple stored procedure with
JayBird/Firebird. I feel like I'm beating my head against a wall..
I have tried this statement (and many variations) using all of the
following:
ISQL
Squirrel 2.1 final
MyEclipse IDE Database Explorer
Direct JDBC access from my Java code
I get consistent failures from all..
------- ISQL session...
-- attempt 1
SQL> CREATE PROCEDURE SELTEST AS BEGIN SELECT * FROM COMPUTER; END
CON> ;
Statement failed, SQLCODE = -104
Dynamic SQL Error
-SQL error code = -104
-Token unknown - line 1, char 57
-;
-- attempt 2
SQL> CREATE PROCEDURE SELTEST AS BEGIN SELECT * FROM COMPUTER END;
Statement failed, SQLCODE = -104
Dynamic SQL Error
-SQL error code = -104
-Token unknown - line 1, char 58
-END
-- attempt 3
SQL> SET TERM ^^;
SQL> CREATE PROCEDURE SELTEST AS BEGIN SELECT * FROM COMPUTER;
CON> END ^^
Statement failed, SQLCODE = -104
Dynamic SQL Error
-SQL error code = -104
-Token unknown - line 1, char 57
-;
SQL>
SQL> SET TERM ;^^
SQL>
-------------- end isql
------------- My own code (snippet)..
Statement sqlStatement = sqlConn.createStatement();
String sqlStr = " CREATE PROCEDURE SELTEST AS BEGIN SELECT * FROM
COMPUTER; END ";
System.out.println(sqlStr);
sqlStatement.executeUpdate(sqlStr);
Result..
CREATE PROCEDURE SELTEST AS BEGIN SELECT * FROM COMPUTER; END
SQL error: sql Failed
GDS Exception. 335544569. Dynamic SQL Error
SQL error code = -104
Token unknown - line 1, char 58
;
Error Code: 335544569
SQL State: HY000
----------
Squirrel and MyEclipse produce very similar results.
consistent difficulty with creating a simple stored procedure with
JayBird/Firebird. I feel like I'm beating my head against a wall..
I have tried this statement (and many variations) using all of the
following:
ISQL
Squirrel 2.1 final
MyEclipse IDE Database Explorer
Direct JDBC access from my Java code
I get consistent failures from all..
------- ISQL session...
-- attempt 1
SQL> CREATE PROCEDURE SELTEST AS BEGIN SELECT * FROM COMPUTER; END
CON> ;
Statement failed, SQLCODE = -104
Dynamic SQL Error
-SQL error code = -104
-Token unknown - line 1, char 57
-;
-- attempt 2
SQL> CREATE PROCEDURE SELTEST AS BEGIN SELECT * FROM COMPUTER END;
Statement failed, SQLCODE = -104
Dynamic SQL Error
-SQL error code = -104
-Token unknown - line 1, char 58
-END
-- attempt 3
SQL> SET TERM ^^;
SQL> CREATE PROCEDURE SELTEST AS BEGIN SELECT * FROM COMPUTER;
CON> END ^^
Statement failed, SQLCODE = -104
Dynamic SQL Error
-SQL error code = -104
-Token unknown - line 1, char 57
-;
SQL>
SQL> SET TERM ;^^
SQL>
-------------- end isql
------------- My own code (snippet)..
Statement sqlStatement = sqlConn.createStatement();
String sqlStr = " CREATE PROCEDURE SELTEST AS BEGIN SELECT * FROM
COMPUTER; END ";
System.out.println(sqlStr);
sqlStatement.executeUpdate(sqlStr);
Result..
CREATE PROCEDURE SELTEST AS BEGIN SELECT * FROM COMPUTER; END
SQL error: sql Failed
GDS Exception. 335544569. Dynamic SQL Error
SQL error code = -104
Token unknown - line 1, char 58
;
Error Code: 335544569
SQL State: HY000
----------
Squirrel and MyEclipse produce very similar results.