x64 pointers bug?

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Tolikfon
Posts: 2
Joined: Tue 17 Jun 2008 11:43
Location: Russia

x64 pointers bug?

Post by Tolikfon » Wed 18 Jun 2008 03:04

When i try to read clob, i catch exception.

Code: Select all

 str := oraQuery.FieldByName('my_clob').AsString;
  • at System.IntPtr.op_Explicit(IntPtr value)
    at CoreLab.Dac.TCRBlobData.Read(UInt32 Position, UInt32 Count, IntPtr Dest)
    at CoreLab.Dac.TBlob.Read(UInt32 Position, UInt32 Count, IntPtr Dest)
    at CoreLab.Odac.TOraLob.Read(UInt32 Position, UInt32 Count, IntPtr Dest)
    at CoreLab.Dac.TData.ReadBlob(UInt16 FieldNo, IntPtr RecBuf, Int32 Position, Int32 Count, IntPtr Dest, Boolean FromRollback, Boolean TrueUnicode)
    at CoreLab.Dac.TBlobStream.Read(Byte[]& Buffer, Int32 Offset, Int32 Count)
    at Borland.Vcl.TStream.Read(Byte[]& Buffer, Int32 Count)
    at Borland.Vcl.TStream.ReadBuffer(Byte[] Buffer, Int32 Count)
    at Borland.Vcl.TBlobField.GetAsString()
    at Borland.Vcl.TField.get_AsString()
    at DataModule.Data.Execute()
System.OverflowException
"Arithmetic operation resulted in an overflow."

ODAC 6.50.0.5034 for Delphi, C++Builder, and RAD Studio 2007 Trial

Oracle Server 9.2.0.7.0
Oracle Client 10.2.0
Win Server 2003 R2 Standart x64 Edition SP2
.Net 2.0 x64

Win x64
Code execute in COM+ server libriary throw exception System.OverflowException.
The same code as windows console application works fine.

Win x32
Under 32bit environment works fine in both mode.

Code: Select all

//example C#
void Execute()
{
  using (TOraSession oraSession = new TOraSession(null))
  {
    oraSession.Password = "pwd";
    oraSession.Username = "user";
    oraSession.Server = "orcl";
    oraSession.Open();
    string r = oraSession.OracleVersion;
    using (TSmartQuery q = new TSmartQuery(null))
    {
      q.Session = oraSession;
      q.SQL.Text = "select my_clob from my_table";
      q.ExecSQL();
      while (!q.Eof)
      {
        TField f = q.FieldByName("my_clob");
        if (!f.IsNull)
        {
          try
          {
            string blob = f.AsString;
          }
          catch (Exception e){}
        }
        q.Next();
      }
    }
  }
}

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Wed 18 Jun 2008 10:37

ODAC does not support .Net Framework x64. Please try our OraDirect .NET. You can download it here http://www.crlab.com/oranet/download.html

Tolikfon
Posts: 2
Joined: Tue 17 Jun 2008 11:43
Location: Russia

Post by Tolikfon » Wed 18 Jun 2008 17:38

It's sad
I need create build for my Delphi 7 project with RAD 2007.

Post Reply