Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Retrieving PL/SQL associative arrays with OCCI...
All,
I'm wondering if anyone can give me a pointer or two to help me resolve a
problem.
I have a package body defining an associative array:
CREATE OR REPLACE PACKAGE PK_WS_Data AS
and now I need to be able to access data of this type returned by a procedure in this package as an OUT variable. How does one do this in OCCI?
My attempt is as follows:
std::vector<float> values;
...
stmnt->registerOutParam( 7, oracle::occi::OCCIVECTOR, 0,
"PK_WS_Data.NumArray");
...
oracle::occi::getVector(rs, (unsigned int) 7, values);
(which all refer to the same data item) but I get an error: OCI-22303: type "PK_WS_Data"."NumArray" not found. Whatever I place in the last argument of the register call gives a similar runtime error.
I have found a metalink item: 308592.1 that seems to refer to something similar, but they are using an object type, and not using a package.
Does anyone have an example closer to what I'm doing? The OCCI documentation doesn't have anything similar that I've found.
Do I need to define this type external to the package and if so what code change would I need?
I have been able to do this in PHP easily which is funny, PHP is usually harder than OCCI... :-)
Many thanks in advance,
GEQ
-- Geoff Quelch Email: gequelch_at_frii.net -- http://www.freelists.org/webpage/oracle-lReceived on Thu Jan 25 2007 - 15:55:26 CST
![]() |
![]() |