Home » Developer & Programmer » Precompilers, OCI & OCCI » Retrieve collection of user-defined object in OCCI
Retrieve collection of user-defined object in OCCI [message #93943] Fri, 09 May 2003 19:12 Go to next message
Edward
Messages: 6
Registered: October 2000
Junior Member
Hi, there

I am having a OCCI problem, see if you guys can help me.

I try to retrieve a collection of user-define objects.

The major steps I am using are
1. define database object

CREATE OR REPLACE TYPE my_obj_t AS OBJECT
( id number, name varchar2(10) )

CREATE OR REPLACE
TYPE my_obj_tab_t as table of my_obj_t;

2. A stored procedure return a collection as out paramerter

my_stored_procedure(obj_list out my_obj_tab_t);

3. Using OTT to generate the *.cpp and header files.

4. Register out parameter like

vector<my_obj_t> vect;

stmt->registerOutParam(1, OCCIVECTOR,
sizeof (vect),
"MY_OBJ_TAB_T");

5. stmt->execute();

6. Try to get the results by
getVector(stmt, 1, vect);

I am getting compilation error:

Could not find a match for
oracle::occi::getVector(oracle::occi::Statement*,
int, std::vector<my_obj_t, std::allocator<my_obj_t>>).

Am I doing the right things ?
What steps and function should I use ?

Thanks in advance.

Edward
Re: Retrieve collection of user-defined object in OCCI [message #497919 is a reply to message #93943] Mon, 07 March 2011 15:36 Go to previous message
bwbmds
Messages: 2
Registered: March 2011
Junior Member
Add
attraccess=private
to your ott command line
Previous Topic: OCCI AQ Enqueue of object with blob
Next Topic: Multithreading/Pro*C Insert Issue
Goto Forum:
  


Current Time: Thu Apr 17 21:08:05 CDT 2014

Total time taken to generate the page: 0.10100 seconds