Oracle Client 9.2i, Oracle Server 9.2i.
Prepare table:
Code: Select all
create table TEST
(
ID NUMBER(9) not null,
GUID RAW(16)
)
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();
}
}
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.