Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> C structures in Pro*C???

C structures in Pro*C???

From: Z. Martinez <zlm101_at_psu.edu>
Date: 1997/03/27
Message-ID: <333ad104.4211651@news.cac.psu.edu>#1/1

I have some questions pertaining inserting data using Pro*C.

Here is my situation....

I have an Oracle table declared as

id char(6)
type char (2)
desc varchar2(40)
qty number (10,2)

Now, how do I declare my C structures in Pro*C??

Our C structure now looks like this

struct trn
{

   char        id [6];
   char        type [2];
   char        desc [41];

   double qty;
}

Is this correct??
One specific question is, do I need to null terminate the "id" field (which means I have to declare it as "char id [7]"), or does Pro*C just get the first 6 characters of id??

And how do I declare my EXEC SQL statement??

Please send your response to zlm101_at_psu.edu

Thanks in advance!! Received on Thu Mar 27 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US