passing array of nullable to storedprocedure

passing array of nullable to storedprocedure

Postby 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)
Linkelf
 
Posts: 9
Joined: Thu 02 Apr 2009 21:29

Postby 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
Devart Team
 
Posts: 7608
Joined: Thu 14 Aug 2008 12:44

Postby 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.
Shalex
Devart Team
 
Posts: 7608
Joined: Thu 14 Aug 2008 12:44

Postby Linkelf » Sat 29 Jan 2011 07:54

thx! fast work! :D
Linkelf
 
Posts: 9
Joined: Thu 02 Apr 2009 21:29

Postby 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 .
Shalex
Devart Team
 
Posts: 7608
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle