jstrunk wrote:
I was coding "create procedure show_suppliers ...." and the error went away
when I changed it to
"create procedure show_suppliers() ....". Does that make sense?
It is like declaring a method with no arguments in Java: you still need
an empty argument list.
There are no
parms on the method but I saw the parens in a syntax diagram and thought
they might be required anyway.
The sample code I am using seems to be full of errors which makes it very
hard to learn from.
Does anyone have working sample programs that use JBDC and to create, store,
and run a SQLJ stored procedure?
Try looking at the "scores" demo which is in the Derby source code under
java/demo/scores. In particular,
java/demo/scores/java/client/org/apache/derbyDemo/scores/data/Database.java
will give you examples of how to declare Derby functions and procedures.
The main class of that application shows you how to use functions and
procedures at runtime:
java/demo/scores/java/client/org/apache/derbyDemo/scores/app/Scores.java.
Hope this helps,
-Rick
jstrunk wrote:
I am using Eclipse 3.5.0 with Derby 10.5.3.0 (not the Derby Plugin). I
created an SQLJ stored procedure and stored it. When I try to execute it I
get SQLException: Syntax error: Encountered "<EOF>" at line 1, column 19.
That is the only error information I get. How can I get a listing of what
SQL thinks the procedure looks like up to the point where the error
occurs?