C structures in Pro*C???

From: Z. Martinez <zlm101_at_psu.edu>
Date: 1997/03/27
Message-ID: <333ad104.4211651_at_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
{

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

   double qty;
}

Is this correct??
[Quoted] 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??

[Quoted] And how do I declare my EXEC SQL statement??

[Quoted] Please send your response to zlm101_at_psu.edu

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

Original text of this message