Page 1 of 1

NET Unknown Error 1 again (OraDirect 4.50)

Posted: Fri 29 Feb 2008 04:20
by ieichens
I have problems reading blobs. The following code reproduces this problem:

Code: Select all

                OracleCommand cmd = new OracleCommand("create table blobtest(k integer, v blob)", con);
                cmd.ExecuteNonQuery();

                cmd = new OracleCommand("insert into blobtest(k, v) values(:k, :v)", con);
                cmd.Parameters.Add("k", 1);
                cmd.Parameters.Add("v", new byte[13382]);
                cmd.ExecuteNonQuery();

                cmd = new OracleCommand("select k, v from blobtest", con);
                OracleDataReader reader = cmd.ExecuteReader();
                while(reader.Read())
                {
                    object k = reader[0];
                    byte[] v = (byte[])reader[1];
                }
                reader.Close();
The Size (13382) seems to be critical, the exception is not thrown
if this size is increased or decreased by one byte.
I think there are other critical sizes as i get the error on numerous
records in our production database.
The exception occurs only in direct mode.
Database servers testet are versions 9.2.0.8 and 11.1.0.6

As i'm currently switching from ODP.NET to OraDirect.NET
i would appreciate very much a solution to that problem.

Regards
Ingo Eichenseher

Posted: Fri 29 Feb 2008 15:12
by Alexey.mdr
We couldn't reproduce the error.
We have used your code with
OraDirect .NET 4.50,
Oracle server 9i Enterprise Edition Release 9.2.0.6.0 - Production,
Visual Studio 2005.

Could you please specify what exception and where do you receive?

Posted: Fri 29 Feb 2008 15:27
by ieichens
This is the exception:
  • System.Exception occurred
    Message="NET: Unknown error 1"
    Source="CoreLab.Oracle"
    StackTrace:
    bei CoreLab.Oracle.bn.b(Int32 A_0)
    bei CoreLab.Oracle.bh.b()
    bei CoreLab.Oracle.am.f(Int32 A_0, Byte[] A_1, Int32 A_2, Int32 A_3)
    bei CoreLab.Oracle.am.b(Int32 A_0, Byte[] A_1, Int32 A_2, Int32 A_3)
    bei CoreLab.Oracle.b.u()
    bei CoreLab.Oracle.f.f(Byte[] A_0, Int32 A_1, Int32 A_2)
    bei CoreLab.Oracle.OracleDataReader.GetValue(Int32 i)
    bei CoreLab.Common.DbDataReaderBase.get_Item(Int32 ordinal)
    bei CoreBug.Program.Main(String[] args) in C:\prj\test\CoreBug\Program.cs:Zeile 79.
    InnerException:
The line is: byte[] v = (byte[])reader[1];
I'm using VS 2008

Posted: Fri 29 Feb 2008 15:39
by Alexey.mdr
It probably depends on the data itself.
Could you try reproducing the error on other data?
If it's possible please send us the file that results in exception.

Posted: Fri 29 Feb 2008 16:02
by ieichens
I also assumed some dependency on the data itself and first
tried to produced the error by copying the offending record
from the production database.

But as you can see it seems not to depend, as i can
also produce the exception by simply inserting new byte[..]

I can give you connection data to access this example
table over the internet if you like. But i would no like
to post that data here

Posted: Fri 29 Feb 2008 17:20
by Alexey.mdr
Sure. Send it please to my email (alexeyman*crlab*com).
What OS have you got on the server side and the client side?