Subject | Re: [IBO] no return message of error in contraint of type check |
---|---|
Author | Magni Thor Mortensen |
Post date | 2006-09-01T09:39:47Z |
Hello all,
I have noticed this as well.
if you do a "select from non_existing_table" for example and trap the
exception with the usual
"on e:exception do begin end;" e.message is empty
the onError event on IB_Connection and IB_Session does not work
correctly either
if you trap an exception elsewhere the onError event is never fired.
and the RaiseException variable inside the onError event seems to be ignored
this is only a problem if you use TIBOQuery, with TIB_Query it seems fine.
Example:
procedure test;
var
c : TIB_Connection;
q : TIBOQuery;
begin
c := TIB_Connection.Create(self);
q := TIBOQuery.Create(self);
q.IB_Connection := c;
c.DatabaseName := 'localhost:C:\Firebird\examples\EMPLOYEE.FDB';
c.Username := 'SYSDBA';
c.Password := 'masterkey';
q.SQL.Text := 'select * from non_exsisting_table';
try
q.Open;
except
on e:exception do begin
showmessage(e.message);
end;
end;
end;
Magni
Helen Borrie wrote:
I have noticed this as well.
if you do a "select from non_existing_table" for example and trap the
exception with the usual
"on e:exception do begin end;" e.message is empty
the onError event on IB_Connection and IB_Session does not work
correctly either
if you trap an exception elsewhere the onError event is never fired.
and the RaiseException variable inside the onError event seems to be ignored
this is only a problem if you use TIBOQuery, with TIB_Query it seems fine.
Example:
procedure test;
var
c : TIB_Connection;
q : TIBOQuery;
begin
c := TIB_Connection.Create(self);
q := TIBOQuery.Create(self);
q.IB_Connection := c;
c.DatabaseName := 'localhost:C:\Firebird\examples\EMPLOYEE.FDB';
c.Username := 'SYSDBA';
c.Password := 'masterkey';
q.SQL.Text := 'select * from non_exsisting_table';
try
q.Open;
except
on e:exception do begin
showmessage(e.message);
end;
end;
end;
Magni
Helen Borrie wrote:
>
> At 09:55 PM 31/08/2006, you wrote:
> >And updated my ibobjects to the version 4.6Bc, and and I see a small
> >bug
> >When the firebird provokes an exception of type check the ibobject now
> >he does not return the type of produced error, with which it is not
> >possible to know that contraint of type check to given the error
>
> Do you have a reproducible demonstration, that you could provide as
> source code, and upload as a zip file to the "Files" area of this list?
>
> Helen
>
>