Raw column & parameter bug
Posted: 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:
Execute the following code (provide your own connection string):
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.
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.