135
Views
3
Comments
[Oracle Connector P9] How to call procedures with null values?
Question
oracle-connector-p9
Web icon
Forge asset by João Grazina
Hi,

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?

UserImage.jpg
Steve Finch

Hi,

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.
UserImage.jpg
Tiago Pascoal
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
2017-10-09 13-20-50
Gerrit Bouhuis
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? 


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.