Re: OCI: How do you set/retrieve NULL on a VARRAY column ?
Date: 1998/06/13
Message-ID: <3582B3B7.662958E2_at_u.washington.edu>#1/1
OCI has within in the binds an indicator variable which is a short integer.
To set a null variable, I believe the indicator is -1.
When reading variables, the indicator is 0 for a good read,
-1 for a null and +1 for a overflow (too big or too small). In the overflow
case,
often the available part of the valus is there, but it may be unreliable. For
example,
a string would be truncated to fit into the given space.
To do all the testing all the time is a pain to type, but generally you are
not
changing the binding code that often. It is basically error checking.
In the past I have generate a struct/class that contains the indicator with
the data
to facilitate working with the read data. I generally convert any problem data
immediately after the OCI call is executed.
Mike Krolewski
Talha Siddiqui wrote:
> Hi,
>
> I am looking to write set/test NULL functions for VARRAY columns. However,
> since OCIArray types don't go through the OTT, I can't use the likes
> of the _atomic indicator and am thus left to test for NULL-ness on my own.
>
> Any suggestions on how I could make that happen ?
>
> Thanks in advance,
>
> -talha
Received on Sat Jun 13 1998 - 00:00:00 CEST