Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to pass a ref cursor to a SP

Re: How to pass a ref cursor to a SP

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Sat, 17 Jul 1999 14:05:52 +0800
Message-ID: <37901D40.772B@yahoo.com>


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
--



Connor McDonald
"These views mine, no-one elses etc etc" connor_mcdonald_at_yahoo.com

"Some days you're the pigeon, and some days you're the statue." Received on Sat Jul 17 1999 - 01:05:52 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US