Subject | Re: [Firebird-Java] Calling Stored procedure with no inputs |
---|---|
Author | Roman Rokytskyy |
Post date | 2005-11-01T04:18:11Z |
> I have upgraded web application from Interbase (open source 6 withWhich version of InterClient have you used?
> interclient) to the latest Firebird and FirebirdSQL driver..
> I'm encountering some code that no longer works..In this case you should have used stmt.execute() method. The executeQuery()
>
> String _sSql = "{call sp_do_due_date}"
> CallableStatement _stmt = this.g_con.prepareCall(arg_sSql);
> _stmt.executeQuery();
>
> The stored procedure has NO inputs or outputs..
call should be used only with selectable procedures, since only selectable
procedures can return result sets. See javadoc for
FirebirdCallableStatement.setSelectable(boolean) method.
The error you see most likely is a bug in escaped call parser, but I have
tested it with JayBird 2.0 RC3a and it works (or more correctly, it fails,
but with the error message "No result set for sql", which is correct in this
case). If you have tried it with this version of driver, please create a
test case, so I can reproduce the error.
Roman