[Oracle Connector P9] How to call procedures with null values?

Forge Component
Published on 2015-03-13 by Grazina
8 votes
Published on 2015-03-13 by Grazina

we have some stored-procedures whicg hav input values of number which can be null as well.
how can we call those with this component?


Any solution to this? I have the same same problem with numbers and dates. Tried NullDate() as the param value for the dates, but still getting 01-JAN-00 in the Oracle table instead of NULL. Can't change the stored procedure as it's a 3rd party app.
Version 1.0.0 now supports passing nulls for any parameter type.

If you know that values will never be null, you keep using basic types, however if you want to control if a paramer is null use the Nullable<Type>

In your case, you have a NullableDate which contains two attributes IsNull (a predicate that indicates the value is null) and Value which contains the date value (if the value is not null).

There is also a CreateNullDate function to ease the pain of defining values (it's just an helper)

Beware: this version introduces breaking changes, specially to support nulls in parameters but also for functions return values
Short question: passing a null value works perfectly for parameter of type Date when we use a structure with an attribute with Data Type NullableDate

Seems not to work for parameter of type number when we use a structure with an attribute with Data Type NullableDecimal can you please help us out?