Page 1 of 1

NET: Unknown error 1 reading from 9.0.1 or 9.2.0 in direct

Posted: Fri 17 Oct 2008 00:07
by smpickett
I am receiving a "NET: Unknown error 1" error when reading a query that contains a CHAR(100) column. I am getting this error when connected to Oracle 9.0.1 and 9.2.0 databases in direct mode.

I have OraDirect.NET version 4.75.42.0.

Stack:
  • at CoreLab.Oracle.bp.b(Int32 A_0)
    at CoreLab.Oracle.n.b()
    at CoreLab.Oracle.d.c(Int32 A_0)
    at CoreLab.Oracle.OracleDataReader.Read()
    at OradirectTest1.Form1.button2_Click(Object sender, EventArgs e) in C:\Documents and Settings\zippy\My Documents\Visual Studio 2005\Projects\OradirectTest1\OradirectTest1\Form1.cs:line 89

Code: Select all

      conn.Open();
      OracleCommand cmd = new OracleCommand("DROP TABLE TAB_CHAR_1 CASCADE CONSTRAINTS", conn);
      cmd.ExecuteNonQuery();
      cmd = new OracleCommand("CREATE TABLE tab_char_1( id INT NOT NULL PRIMARY KEY,  col1_1 CHAR (100))", conn);
      cmd.ExecuteNonQuery();
      cmd = new OracleCommand("INSERT INTO tab_char_1 VALUES (4, 'text text text text')", conn);
      cmd.ExecuteNonQuery();
      cmd = new OracleCommand("INSERT INTO tab_char_1 VALUES (5, 'text 01; text 02; text 03; text 04; text 05; text 06; text 07; text 08; text 09; text 10; text 11; t')", conn);
      cmd.ExecuteNonQuery();
      cmd = new OracleCommand("commit", conn);
      cmd.ExecuteNonQuery();

      cmd = new OracleCommand("select col1_1 from tab_char_1", conn);
      OracleDataReader reader = cmd.ExecuteReader();
      while (reader.Read())
      {
        string id = reader.GetString(0);
      }
      reader.Close();
      reader.Dispose();

Thanks,

Shawn...[/list]

Posted: Fri 17 Oct 2008 14:35
by Shalex
Thank you for your test code. But I cannot reproduce the issue neither on 4.75.42.0 nor on 4.75.43.0 versions of OraDirect .NET. All work fine.

Probably, this is a network problem. Oracle server doesn't "understand" the accepted packages or several commands in separate threads are executed simultaneously connecting to the same database.