Error message is empty

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
sinys
Posts: 186
Joined: Tue 21 Feb 2012 03:44

Error message is empty

Post by sinys » Mon 29 Jul 2013 11:06

Please look example
ODAC 9.0.2, Delphi XE2

Code: Select all

declare
  ver integer;
  s_ver varchar2(500);
begin
  select banner into s_ver from v$version where rownum = 1;
  if instr(s_ver, '11') > 0 then
    execute immediate 'create or replace procedure test111 wrapped
a000000
ab
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
7
28 5d
VSgkSYV2QlRGIa+U88RXagsERmMwg5nnm7+fMr2ywFwWoWLRfyEhw6V0i8DAMv7ShglppZmB
CC2LwIHHLcmmpu4CnhQ=';
  else
    execute immediate 'create or replace procedure test111 is
begin
  null;
end;';
  end if;
end;

Code: Select all

procedure TForm1.Button2Click(Sender: TObject);
begin
  try
    OraSQL1.Execute;
  except
    on e : exception do
      ShowMessage(e.Message);  // show error
  end;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  try
    OraQuery1.Execute;
  except
    on e : exception do
      ShowMessage(e.Message); // e.Message is empty
  end;
end;
This code raise error in OraSQL1 and raise empty error in OraQuery1.

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

Re: Error message is empty

Post by AlexP » Mon 29 Jul 2013 11:59

Hello,

Thank you for the information, we have reproduced and fixed the problem, this fix will be included in the next build.

Post Reply