Error on ExecuteArray with a column of type LONGRAW

Error on ExecuteArray with a column of type LONGRAW

Postby Rolf » Tue 17 Apr 2012 14:24

Hi,

I have a problem executing an ExecuteArray command on a table with a field of type LONGRAW

The following works fine

Code: Select all

            string sql = "Insert into FL_KATEGORIENBILDER values (:1, :2)";

                // write single line
                long param1 = 4;
                byte[] param2 = new byte[3] { 100, 101, 102 };

                List parameter = new List();
                parameter.Add(new OracleParameter("1", OracleDbType.Number, param1, ParameterDirection.Input));
                parameter.Add(new OracleParameter("2", OracleDbType.LongRaw, param2, ParameterDirection.Input));

                OracleCommand command = new OracleCommand(sql);
                command.Parameters.Add(parameter);

                command.ExecuteNonQuery();


When I try the same with an ExecuteArray

Code: Select all
                // write array with two lines
                long[] param3 = new long[2] { 5, 6 };
                byte[][] param4 = new byte[2][] { new byte[3] { 100, 101, 102 }, new byte[3] { 100, 101, 102 } };

                parameter = new List();
                parameter.Add(new OracleParameter("1", OracleDbType.Number, param3, ParameterDirection.Input));
                parameter.Add(new OracleParameter("2", OracleDbType.LongRaw, param4, ParameterDirection.Input));

                command = new OracleCommand(sql);
                command.Parameters.Add(parameter);

                command.ExecuteArray(2);


I get the following error

Eine Ausnahme (erste Chance) des Typs "System.InvalidCastException" ist in Devart.Data.dll aufgetreten.
17.04.2012 14:49:52::Info::--------------------------------------------------
17.04.2012 14:49:52::Error::Das Objekt des Typs "Devart.Data.Oracle.cj[]" kann nicht in Typ "Devart.Data.Oracle.cj" umgewandelt werden.
17.04.2012 14:49:52::Error:: bei Devart.Data.Oracle.OracleParameter.a(bb& A_0, Boolean A_1, OracleConnection A_2, Byte[] A_3, Hashtable A_4, an A_5, Boolean& A_6, Int32 A_7)
bei Devart.Data.Oracle.OracleCommand.a(al A_0, Int32 A_1, OracleParameterCollection A_2, an A_3, Boolean& A_4)
bei Devart.Data.Oracle.OracleCommand.InternalExecute(CommandBehavior behavior, IDisposable disposable, Int32 startRecord, Int32 maxRecords, Boolean nonQuery)
bei Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior, Boolean nonQuery)
bei Devart.Data.Oracle.OracleCommand.ExecuteNonQuery()
bei Devart.Data.Oracle.OracleCommand.ExecuteArray(Int32 iters)

Can you give me any hint what's going wrong?

Regards

Rolf

Version: Devart dotConnect for Oracle 6.80.332.0
Rolf
 
Posts: 6
Joined: Wed 11 Jan 2012 15:46

Postby Pinturiccio » Thu 19 Apr 2012 12:40

We have reproduced the issue. We will investigate it and notify you about the results as soon as possible.
Pinturiccio
Devart Team
 
Posts: 2046
Joined: Wed 02 Nov 2011 09:44

Postby Rolf » Thu 19 Apr 2012 14:57

Thanks for the feedback. Looking forward to find a solution.

Regards,
Rolf
Rolf
 
Posts: 6
Joined: Wed 11 Jan 2012 15:46

Postby Pinturiccio » Tue 24 Apr 2012 13:12

We have fixed the bug with the OracleCommand.ExecuteArray method when one of parameters has type equal to LONG or LONG RAW. We will notify you when the corresponding build of dotConnect for Oracle is available for download.
Pinturiccio
Devart Team
 
Posts: 2046
Joined: Wed 02 Nov 2011 09:44

Postby Pinturiccio » Fri 27 Apr 2012 05:12

The new build of dotConnect for Oracle 6.80.350 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).
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=23996
Pinturiccio
Devart Team
 
Posts: 2046
Joined: Wed 02 Nov 2011 09:44


Return to dotConnect for Oracle