Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to pass a ref cursor to a SP
Luca Cappelletti wrote:
>
> Hi all
> I need to pass a REF CURSOR to a stored procedure from a Java program.
> I tried to use the OracleCallableStatement setting the IN parameter
> with the setCursor call, but it doesn't seem to work.
> Using the thin driver, the execution causes a PROTOCOL ERROR
> (which is undocumented at the moment),
> while using the OCI driver it causes an ORA01001 error (invalid
> cursor). The parameter I am passing is a java Resultset, that seems
> to be the right mapping to the Oracle REF CURSOR type.
> All the Oracle examples show how to get a REF CURSOR in
> return, no-one of them shows how to pass it as an input parameter.
>
> Any hint?
> Thanks anticipately,
> Luca
I don't know much about java - but maybe it is a type incompatibility...Try declaring your ref cursor type in a package and referencing it from both you stored proc and your java program...
HTH
--
"Some days you're the pigeon, and some days you're the statue." Received on Sat Jul 17 1999 - 01:05:52 CDT
![]() |
![]() |