Raw column & parameter bug

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Alladin
Posts: 149
Joined: Mon 27 Nov 2006 16:18
Contact:

Raw column & parameter bug

Post by Alladin » Fri 11 Jan 2008 17:11

I'm experiencing weird problem (with MS&Oracle driver works). ExecuteNonQuery hangs in following scenario...

Oracle Client 9.2i, Oracle Server 9.2i.

Prepare table:

Code: Select all

create table TEST
(
  ID    NUMBER(9) not null,
  GUID               RAW(16)
)
Execute the following code (provide your own connection string):

Code: Select all

using (var con = new OracleConnection(cs))
{
  con.Open();

  using (var cmd = con.CreateCommand())
  {
    cmd.CommandText = "insert into test (id,guid) values (:id, :guid)";
    cmd.Parameters.AddWithValue("id", 25);
    cmd.Parameters.AddWithValue("guid", Guid.NewGuid().ToByteArray());

    cmd.ExecuteNonQuery(); // <- hangs here

    con.Commit();
  }
}
Please fix. Microsoft and Oracle drivers are working fine in this case.

FYI, If I manually change parameter.OracleDbType to OracleDbType.Raw, example works fine. The problem is that standard DataAdaptor (where similar code is used) is not that smart and we have no chance to fix it there.

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Mon 14 Jan 2008 13:57

I tested your example and it works fine on my machine (in Client mode as well as in Direct mode).
Could you post full (4 digits) version of your server, client, OraDirect .NET?
Do you use direct mode?
Do you use Unicode encoding in the connection string?

Alladin
Posts: 149
Joined: Mon 27 Nov 2006 16:18
Contact:

Post by Alladin » Thu 17 Jan 2008 14:01

Oracle server 9.2.0.6,
Oracle client 9.2,
Oci.dll version 9.2.0.1,
direct mode = false,
NLS_LANG=GERMAN_GERMANY.WE8MSWIN1252...

After reboot of Oracle Server problem is no longer reproducable...

Post Reply