Stored proc returns RECORD & JDBC
Stored proc returns RECORD & JDBC
От:
"Igor Borisovsky" <igor@datanaut.com>
Дата:
Hi.
As you know we have to invoke the stored proc which returns RECORD in the following manner:
Select * from func() as (a datatype1, b datatype2…);
There is no problem to execute such statement as PreparedStatement.
But I need to use only CallableStatement.
Does anyone know how to do it?
Thanks.
Re: Stored proc returns RECORD & JDBC
От:
Oliver Jowett <oliver@opencloud.com>
Дата:
Igor Borisovsky wrote:
> As you know we have to invoke the stored proc which returns RECORD in
> the following manner:
>
> Select * from func() as (a datatype1, b datatype2…);
>
> There is no problem to execute such statement as PreparedStatement.
>
> But I need to use only CallableStatement.
>
> Does anyone know how to do it?
That query will work fine directly in a CallableStatement -- it's a
superset of PreparedStatement.
If you meant "I need to use the {call} escape syntax in a
CallableStatement to generate a query like this" then you can't do that
with the current driver.
-O