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;This is only a useless test package as my company does not allowe me to post the real package source here
Thanks in advance for any help.
Best Regards,
Eric