Re: Pro*C Indicator Variables (bug?)

From: <jaakola_at_cc.helsinki.fi>
Date: 28 Nov 94 21:56:17 EET
Message-ID: <1994Nov28.215617.1_at_cc.helsinki.fi>


In article <CzzMLu.LqA_at_nl.oracle.com>, cgohring_at_lucifer (Carl Gohringer) writes:
> dcure_at_ifremer.fr (David Cure) writes:
> : >The Pro*C manual says that "When MODE=ORACLE, ORACLE does not
> : >issue and error if you SELECT or FETCH a null into a host
> : >variable that is not associated with an indicator variable."
> : >
> : >That would seem to contradict the error message that we
> : >are getting (i.e. ORA-01405: fetched column value is NULL").
> : >
>
> This is new in PRO*C 1.5 and is not a bug.
> You must use an indicator variable if fetching NULLs.

You should have MODE=ORACLE and DBMS=V6, then you should be able to FETCH/SELECT..INTO without indicators. At least I hope that Oracle hasn't dropped that option yet!

However, I encountered a bug in 7.0.16.6 on Solaris 2.3 that if you have more than 16 columns in your SELECT..INTO list, you get an ORA-01405... It's a bug, not a feature, but there's no patch yet...

>
> Why was this change made?
> It was made to become compliant with ANSI SQL standards.
> The new behavior is the standard.

I was perfectly happy when NULL would just leave the INTO variable unchanged. I initialized it into '' before every INTO and it worked well for me (I used mostly character strings, for numbers too). I think this new standard compliance is a step backwards, because it just makes your Pro*C code more complicated.

Maybe this is a way to force us use PL/SQL, where every variable is capable of holding The One and Only NULL...

--
Juhani Jaakola, jaakola_at_cc.helsinki.fi
Received on Mon Nov 28 1994 - 20:56:17 CET

Original text of this message