passing array of nullable to storedprocedure

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Linkelf
Posts: 9
Joined: Thu 02 Apr 2009 21:29

passing array of nullable to storedprocedure

Post by Linkelf » Wed 26 Jan 2011 15:38

Code: Select all

CREATE OR REPLACE TYPE "NUMBER_TBL" table of number;

Code: Select all

StoredProcedure.Parameters.Add(new Devart.Data.Oracle.OracleParameter("array", Devart.Data.Oracle.OracleDbType.Table, 0, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "", System.Data.DataRowVersion.Current, null, 0, "NUMBER_TBL"));
Since number can be null i want pass array with nulls from client to DB.
I suppose :

Code: Select all

StoredProcedure.Parameter["array"].Value = new double?[];
but

Code: Select all

StoredProcedure.ExecuteNonQuery();
raises

Code: Select all

Can not convert.
Stack trace: 
   в Devart.Data.Oracle.NativeOracleObjectBase.a(Object A_0, OracleAttribute A_1, IntPtr A_2)
   в Devart.Data.Oracle.NativeOracleArray.SetElementValue(Object value, Int32 i)
   в Devart.Data.Oracle.NativeOracleArray.a(Object A_0)
   в Devart.Data.Oracle.NativeOracleArray.set_Value(Array value)
   в Devart.Data.Oracle.OracleParameter.a(OracleDbType A_0, Object A_1, Object A_2, Byte[] A_3, Hashtable A_4, Int32 A_5, Int32 A_6, Int32 A_7, Int32 A_8, Int32 A_9, Boolean A_10, OracleConnection A_11, ParameterDirection A_12, String A_13, a5 A_14, Boolean& A_15)

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Fri 28 Jan 2011 11:37

Thank you for your report. We have reproduced the issue. We will investigate it and notify you about the results as soon as possible.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Fri 28 Jan 2011 16:52

We have fixed the bug with inserting NULLs. I will post here when the corresponding build is available for download.

Linkelf
Posts: 9
Joined: Thu 02 Apr 2009 21:29

Post by Linkelf » Sat 29 Jan 2011 07:54

thx! fast work! :D

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Thu 10 Feb 2011 14:16

New build of dotConnect for Oracle 6.10.103 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with valid subscription only): http://secure.devart.com/ .
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=20224 .

Post Reply