NET Unknown Error 1 again (OraDirect 4.50)

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
ieichens
Posts: 8
Joined: Wed 16 Jan 2008 08:08

NET Unknown Error 1 again (OraDirect 4.50)

Post by ieichens » Fri 29 Feb 2008 04:20

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

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Fri 29 Feb 2008 15:12

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?

ieichens
Posts: 8
Joined: Wed 16 Jan 2008 08:08

Post by ieichens » Fri 29 Feb 2008 15:27

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

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Fri 29 Feb 2008 15:39

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.

ieichens
Posts: 8
Joined: Wed 16 Jan 2008 08:08

Post by ieichens » Fri 29 Feb 2008 16:02

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

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Fri 29 Feb 2008 17:20

Sure. Send it please to my email (alexeyman*crlab*com).
What OS have you got on the server side and the client side?

Post Reply