Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Pro*C MODE=ORACLE not working?
Robert Eskridge wrote:
>
> I'm using Pro*C 2.1.2 with Oracle 7.2.2 on Solaris 2.5 and gcc 2.7.2 and
> most everything seems to work great. I do have one problem (obviously
> or I wouldn't be asking for advice).
>
> I've been using batch fetches into host arrays. It works in many
> situations. However, I have some number of columns in certain tables
> that can contain null values. The compiled version seems to be
> executing in MODE=ANSI14 where this returns an error ORA-01405 and stops
> the fetch at the row with the NULL.
>
> I've tried adding MODE=ORACLE to the command line when I call proc,
> which according to the Pro*C 1.5 documentation is supposed to work. (I
> know I'm using old documentation and that's really the root of my
> problem.) Does anyone know how to get this working in 2.1.2?
>
> Thanks.
>
> Robert Eskridge
> bryny_at_intex.net
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
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..
-- Rick Kupcunas rkupcuna_at_gte.net 972.776.3837 (office) BSG/Alliance IT rkupcuna_at_bsginc.com 972.661.3629 (fax) Sr. Technical Specialist 800.975.7786 (pager) - DBA/Database Consultant (Oracle, Informix, Sybase) - VL-DBA/Data Warehouse Specialist *** Views expressed within are my own thoughts and not those of *** *** my employer nor of my clients ***Received on Fri Oct 03 1997 - 00:00:00 CDT