OCI Objects with C in Oracle 8i

From: Selva <t_selva_at_yahoo.com>
Date: 27 Apr 2003 21:41:56 -0700
Message-ID: <1627430d.0304272041.6375ec4_at_posting.google.com>


Hi all,

   I'm using TYPE Objects in C Language on Oracle 8i platform.    I access only one table which contains 5 number fields and 3 different TYPE

   Objects.
   What is the sequence of using these OCI APIs in C Language to access this table, specifically for Objects.   I'm able to access the 5 numbef fields comfortably (insert & select).
  For the TYPE Objects, i'm able to insert, but while querying using SELECT through C language & OCI Calls, i get junk values, different from what is in the table.
 Am i making any mistake in the sequence of the OCI API calls....namely...
  OCIDescribeAny
  OCIObjectPin
  OCIDefineObject

  I also have a doubt whether each of these have to be called once for each Object in the SELECT statement or just once for the statement.

  I'm using the Following line to print Intergers in C, is this correct ?!

  OCINumberToInt(errhp,&(objectcol->invokeid_n2),2,OCI_NUMBER_SIGNED,(dvoid *)&value);

  where objectcol -> is the instance of the object in the table,   value is a integer.

  Thanks in advance,
  Selva Received on Mon Apr 28 2003 - 06:41:56 CEST

Original text of this message