Re: Pro*C Question *******************
From: Alan B. Evans <aevans_at_kaiwan.com>
Date: 3 Jun 1994 07:04:12 -0700
Message-ID: <2snd8s$78f_at_kaiwan.kaiwan.com>
} VARCHAR ; where xxx is the maximum size of the host variable.
Date: 3 Jun 1994 07:04:12 -0700
Message-ID: <2snd8s$78f_at_kaiwan.kaiwan.com>
badri (badri_at_cc.gatech.edu) wrote:
: Hi:
: Got a question in Pro*C. I have a char variable.
: I use it as an output variable from ORACLE and hence
: declare it as a string. However, all that I want is one
: alphabet. When I do
: VARCHAR y;
~ This needs some sort of dimension (like y[1])
: char x;
: EXEC SQL DECLARE ....
: FETCH Cursor_Name INTO :a, :b, :y;
: x = y.arr
~~~~~ change the statement above to : x = y.arr[0] ;
: OR
: char x[1];
: x[0] = *y.arr
~~~~~ change the statement above to : x[0] = y.arr[0] ;
:
: ORACLE cries. How to get around this?
: -Badri
The VARCHAR type expands out to (at least on my SVR4 system) :
typedef struct
{
short len ; char arr[xxx] ;
} VARCHAR ; where xxx is the maximum size of the host variable.
Alan
-- You can reach me at _at_ : Internet : aevans_at_kaiwan.com ICBM : 33 39' North Cruise : 33 39' 37" North : 117 59' West : 117 59' 54" WestReceived on Fri Jun 03 1994 - 16:04:12 CEST