oracle.jdbc.driver.OracleTypes.CURSOR as in parameter to PL/SQL [message #92076] |
Sun, 29 February 2004 16:49 |
Oliver Salmon
Messages: 3 Registered: February 2004
|
Junior Member |
|
|
Hi,
I'm sure this may have been answered before but, I desperately need to find out how to use a cursor of type oracle.jdbc.driver.OracleTypes.CURSOR, gained from the out parameter of a callable statement to a PL/SQL stored procedure, as an in parameter of a different callable statement, calling a PL/SQL stored procedure residing on a remote oracle server from the first sp. I have had a lot of trouble trying to find out how to do this and am coming to the conclusion that it can't be done. If it is possible I'd be very grateful for an example. If it is not possible I'd be grateful for a work around.
Both databases are Oracle 9.2.0.4.0 - 64bit Production and I am using the Oracle9i 9.2.0.3 JDBC Drivers. Because of architectural constraints it is not possible to use a database link between the databases.
Thanks in advance for your help,
Oliver
|
|
|
Re: oracle.jdbc.driver.OracleTypes.CURSOR as in parameter to PL/SQL [message #92104 is a reply to message #92076] |
Wed, 10 March 2004 17:33 |
Oliver Salmon
Messages: 3 Registered: February 2004
|
Junior Member |
|
|
The answer I've found is that this is not possible, although there's a mapping from a cursor to a java.sql.ResultSet there is no reverse mapping. The best solution I've found is to change the PL/SQL parameter to a VARRAY and populate with a record whose type is defined in the target database using the Oracle JDBC type STRUCT (can be done dynamically in JDBC).
Oliver
|
|
|