Raw column & parameter bug

Raw column & parameter bug

Postby 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))

  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


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.
Posts: 149
Joined: Mon 27 Nov 2006 16:18

Postby 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?
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Postby Alladin » Thu 17 Jan 2008 14:01

Oracle server,
Oracle client 9.2,
Oci.dll version,
direct mode = false,

After reboot of Oracle Server problem is no longer reproducable...
Posts: 149
Joined: Mon 27 Nov 2006 16:18

Return to dotConnect for Oracle