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 -> Re: Pro*C MODE=ORACLE not working?

Re: Pro*C MODE=ORACLE not working?

From: Robert Eskridge <bryny_at_intex.net>
Date: 1997/10/03
Message-ID: <3435496C.404E@intex.net>#1/1

> If memory serves me right; what you need to do is have a null identifier
> field for each null able column being fetched. For example:
>
> int col_A_NULL,
> col_B_NULL;
> .
> .
> select col_A,
> col_B
> into :col_A:col_A_NULL,
> :col_B:col_B_NULL
> from Table;
>
> without the NULL fields the code does not know what to do with the NULL
> indicator (which will be 0 for a valid value and -1 for a NULL field).
>
> Let me know if this works..

I was wanting not to use the indicator variables. I've got a large number of columns
and I'm bringing them all into VARCHAR. The .len element equalling zero serves the same purpose and I'd rather not have my declarations exceed the length of my program by more than an order of magnitude or so. :-) (Besides, it had a nice clean read to it.)

I got another suggestion via email:

> Robert,
> If you don't include indicator variables you can get around this message
> with the following preprocessor directive -
> UNSAFE_NULL=YES
>
> Good Luck,
> Dave
> dwinslow_at_maroon.tc.umn.edu
>

Indeed, I've been trying to stay away from the indicator variables since I don't need them for any other purpose. That's why I was trying the MODE=ORACLE. Your suggestion sounded good, but I get the following error:

(1) PCC-F-02041, CMD-LINE: Option does not exist: UNSAFE_NULL

Do you know what version this became an option?

Currently, I'm getting around it by fetching one line at a time in a do while loop (instead of the batch fetch) and continuing looping with the -1405 error.

Thanks for the try.

-rje Received on Fri Oct 03 1997 - 00:00:00 CDT

Original text of this message

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