Error with UseOCI7 (9.3.9)

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
llleo
Posts: 10
Joined: Fri 18 Apr 2014 09:58

Error with UseOCI7 (9.3.9)

Post by llleo » Fri 30 May 2014 11:39

Sample code:

Code: Select all

procedure TForm1.TestSession(aUseOci7: boolean);
var
  os1:TOraSession;
  q:TOraQuery;
  sp:TOraStoredProc;
begin
  os1:=TOraSession.Create(nil);
  os1.Username:='***';
  os1.Password:='***';
  os1.Server:='***';
  os1.Pooling:=False;
  os1.Options.UseOCI7:=aUseOCI7;
  os1.Connect;
  q:=TOraQuery.Create(nil);
  q.Session:=os1;
  q.SQL.Text:='select 1 a from dual';
  q.Open;
  ShowMessage(q.FieldByName('a').AsString);
  q.Close;
  sp:=TOraStoredProc.Create(nil);
  sp.Session:=os1;
  sp.StoredProcName:='DBMS_APPLICATION_INFO.read_module';
  sp.PrepareSQL;
  sp.Execute;
  ShowMessage(sp.ParamByName('module_name').AsString);
  os1.Disconnect;
  q.Free;
  sp.Free;
  os1.Free;
end;

Code: Select all

procedure TForm1.Button1Click(Sender: TObject);
begin
  TestSession(False); // all working fine
  TestSession(True);  // error on ANY procedure executing
end;
When i connect with Options.UseOCI7=True, i recieve exception:

Code: Select all

First chance exception at $7600C42D. Exception class EOraError with message
'ORA-00002: Message 2 not found;  product=RDBMS; facility=ORA'.
on executing ANY procedure;

Tested with Oracle client 9/11. Delphi XE5.
Last edited by llleo on Fri 30 May 2014 12:44, edited 1 time in total.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Error with UseOCI7 (9.3.9)

Post by AlexP » Fri 30 May 2014 12:18

Hello,

Thank you for the information. We have reproduced the problem. We will investigate the reasons for such behavior and inform you about the results.

odac9pro
Posts: 14
Joined: Wed 16 Apr 2014 11:01

Re: Error with UseOCI7 (9.3.9)

Post by odac9pro » Wed 18 Jun 2014 07:47

I have the same error with delphi 6 and "ODAC 9.3 for Delphi 6" : 'ORA-00002: Message 2 not found; product=RDBMS; facility=ORA' with Options.UseOCI7=True
when the soft executes a "delete from" in a TOraQuery.

Tested with Oracle client 10/11. Delphi 6 upgrade 2.
Have you got a solution ?
Thanks

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Error with UseOCI7 (9.3.9)

Post by AlexP » Wed 18 Jun 2014 08:33

We continue investigation of this behavior and will inform you as soon as we have any results.

odac9pro
Posts: 14
Joined: Wed 16 Apr 2014 11:01

Re: Error with UseOCI7 (9.3.9)

Post by odac9pro » Thu 26 Jun 2014 07:22

Hello,

Our customers (end-users) will migrate to Oracle 12c.
We will absolutely update odac in our application.
The problem is reassembled blocking, can you take the necessary urgent.

thank you.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Error with UseOCI7 (9.3.9)

Post by AlexP » Thu 03 Jul 2014 09:36

This problem is not yet fixed.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Error with UseOCI7 (9.3.9)

Post by AlexP » Mon 14 Jul 2014 06:51

We have already fixed the problem. This fix will be included to the next build. If you have an edition with source code, I can send you the required changes.

odac9pro
Posts: 14
Joined: Wed 16 Apr 2014 11:01

Re: Error with UseOCI7 (9.3.9)

Post by odac9pro » Mon 04 Aug 2014 08:53

thanks a lot!!!
It seems good...

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Error with UseOCI7 (9.3.9)

Post by AlexP » Mon 04 Aug 2014 09:14

Glad to see that the issue was resolved. If you have any further questions, feel free to contact us.

odac9pro
Posts: 14
Joined: Wed 16 Apr 2014 11:01

Re: Error with UseOCI7 (9.3.9)

Post by odac9pro » Mon 04 Aug 2014 11:03

It's not so good !!!!

if I use the option UseOCI7, when I close my application, the application crash !!!
"RUNTIME ERROR"

Image

It's my code example :

Code: Select all

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, DB, MemDS, DBAccess, Ora, StdCtrls;

type
  TForm1 = class(TForm)
    OraSession1: TOraSession;
    Button1: TButton;
    OraQuery1: TOraQuery;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Déclarations privées }
  public
    { Déclarations publiques }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
  OraQuery1.Open;
  OraQuery1.Last;
  ShowMessage(IntToStr(OraQuery1.RecordCount));
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  OraSession1.Close;
end;
dfm :

Code: Select all

object Form1: TForm1
  Left = 198
  Top = 116
  Width = 870
  Height = 640
  Caption = 'Form1'
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = False
  PixelsPerInch = 96
  TextHeight = 13
  object Button1: TButton
    Left = 232
    Top = 56
    Width = 75
    Height = 25
    Caption = 'Button1'
    TabOrder = 0
    OnClick = Button1Click
  end
  object Button2: TButton
    Left = 472
    Top = 72
    Width = 75
    Height = 25
    Caption = 'Button1'
    TabOrder = 1
    OnClick = Button2Click
  end
  object OraSession1: TOraSession
    Options.UseOCI7 = True
    Username = 'storeland'
    Server = 'nttest-orcl'
    Left = 72
    Top = 112
    EncryptedPassword = '8CFF8BFF90FF8DFF9AFF93FF9EFF91FF9BFF'
  end
  object OraQuery1: TOraQuery
    Session = OraSession1
    SQL.Strings = (
      'select *'
      'from produits')
    Left = 344
    Top = 216
  end
end
When I execute the query and quit the application, "Runtime Error" appears!!

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Error with UseOCI7 (9.3.9)

Post by AlexP » Tue 05 Aug 2014 08:07

Thank you for the information. We have reproduced the problem in younger versions of Delphi and will investigate the reasons of such behavior.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Error with UseOCI7 (9.3.9)

Post by AlexP » Fri 05 Sep 2014 10:03

We have fixed this behavior, the fix will be included to the next version of ODAC.

Post Reply