Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Associative array parameter from c# - handling Null element values

987862Sep 8 2020 — edited Sep 9 2020

I am sure others have run into it but I could not manage to locate an answer. The answers on the web seem to relate to NULL array rather than null values inside the array elements.

In this simplified example - let's say I have defined the following types in my Package...

     TYPE t_NUMBER IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;

    TYPE t_VARCHAR IS TABLE OF VARCHAR2(30) INDEX BY BINARY_INTEGER;

I am providing an input Associative Arrays of types t_NUMBER and  t_VARCHAR as parameters from my c# code to my stored procedure with Oracle.ManagedDataAccess.dll. Some of my elements in the arrray(s) supplied as value for the parameters need to be null as I am representing rows in the table with the arrays. What value should the null elements have?DbNull.Value ? Something else?

Many thanks!

Comments

Post Details

Added on Sep 8 2020
3 comments
596 views