Page 1 of 1

ORA-03120 in Direct Mode

Posted: Wed 13 Oct 2010 14:29
by Lass.Mint
Hi everyone,
I think I have discovered a bug in the new ODAC 7. When I try to run a really big statement in direct mode I always get the Oracle error "ORA-03120: two-task conversion routine: integer overflow". In my case the statement is a big PL/SQL package. When using "Client Mode", all works fine!

To reproduce this bug I created a simple VCL application with a form with just two buttons. One button connects ODAC to the DB and the other one runs the statement. Here's the code of the button click event handlers:

Code: Select all

procedure TForm1.Button2Click(Sender: TObject);
begin
  FODACSession := TOraSession.Create(nil);
  FODACSession.Options.Direct := true;
  FODACSession.AutoCommit := true;
  FODACSession.Username := 'MINT';
  FODACSession.Password := 'XYZ';
  FODACSession.Server := 'localhost:1521:mint';
  FODACSession.ThreadSafety := true;
  FODACSession.Connect;
  if (FODACSession.Connected) then
    ShowMessage('ODAC Connected!');
end;

procedure TForm1.Button3Click(Sender: TObject);
var
  LQuery: TOraQuery;
  SQLString: TStringList;
begin
  SQLString := TStringList.Create;
  SQLString.LoadFromFile('big_package.pkb');

  LQuery := TOraQuery.Create(nil);
  LQuery.Session := FODACSession;
  LQuery.SQL.Text := SQLString.Text;

  try
    LQuery.ExecSQL;
    ShowMessage('Done!');
  except
    on E: Exception do
      ShowMessage(E.Message);
  end;

  LQuery.Free;
  SQLString.Free;
end;
The source of the package body can be found here http://www.media-interactive.de/big_package.pkb.

This is only a useless test package as my company does not allowe me to post the real package source here :wink: . But it shows the problem.

Thanks in advance for any help.

Best Regards,
Eric

Posted: Wed 13 Oct 2010 14:34
by Lass.Mint
By the way: I'm using Turbo Delphi and ODAC 7.00.0.1

Posted: Thu 14 Oct 2010 09:45
by AlexP
Hello,

We already fixed this problem.
This fix will be included in the next build; the next build will be released approximately in two weeks.
If you want, we send you the fixed *.DCU files for your IDE. Please specify your IDE version and email address.

Posted: Thu 14 Oct 2010 10:16
by Lass.Mint
Hello AlexP,
that sounds good. Can you please send the DCU for BDS 2006 (also called BDS 10 or Turbo Delphi) to "[email protected]".

Thanks a lot for the quick help.

Kind Regards,
Eric

Posted: Thu 14 Oct 2010 10:59
by bork
Hello

I sent the fix for BDS 2006 by E-mail.