Precompilers and OCI (MOSC)

MOSC Banner

Handling Collections/Objects in C++

edited Nov 11, 2013 9:28AM in Precompilers and OCI (MOSC) 2 commentsAnswered
 I have some user defined types that are collections containing nested tables.  For example:
CREATE OR REPLACE TYPE a_list_type AS OBJECT (
  a_id INTEGER,
  start_date DATE,
  stop_date DATE,
  desc VARCHAR2(64)
);

CREATE OR REPLACE TYPE a_collection AS TABLE of a_list_type;

CREATE OR REPLACE TYPE main_type AS OBJECT (
   main_id INTEGER,
   main_type VARCHAR2(10),
   a_list_collection a_collection
);

CREATE OR REPLACE TYPE main_collection AS TABLE OF main_type;

Assuming I have a store function that populates and returns an object of "main_collection" type.  How would I reference the returned object from inside a C++ program?  What sort of C++ object would an Oracle object be returned into?

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center