Subject | IBO in a dll & exceptions |
---|---|
Author | petegajria |
Post date | 2002-04-26T17:00:40Z |
Hi,
Im using IBO_queries in a dll along with forms.
Each dll has its own connection with the dbhandle = shared
& set to the main ibconnection in the host program
Now everything runs fine with the dll loaded.
however if say the user does an edit & theres a fk or uk violation
(foriegn key/unique key) then the error flows back through the
ibconnection on that dll
eg
procedure TDataSetDM.IB_ConnectionError(Sender: TObject;
const ERRCODE: Integer; ErrorMessage, ErrorCodes: TStringList;
const SQLCODE: Integer; SQLMessage, SQL: TStringList;
var RaiseException: Boolean);
begin
RaiseException := False;
end;
Now notice RaiseException is set to false yet the exception
flows back out
so after a few times when the user tries to close the program
it generates an error.
both the dll & the host exe are statically compiled ie no runtime
pkgs
if anyone has run into this & has a viable workaround please reply
Thanks
Pete
Im using IBO_queries in a dll along with forms.
Each dll has its own connection with the dbhandle = shared
& set to the main ibconnection in the host program
Now everything runs fine with the dll loaded.
however if say the user does an edit & theres a fk or uk violation
(foriegn key/unique key) then the error flows back through the
ibconnection on that dll
eg
procedure TDataSetDM.IB_ConnectionError(Sender: TObject;
const ERRCODE: Integer; ErrorMessage, ErrorCodes: TStringList;
const SQLCODE: Integer; SQLMessage, SQL: TStringList;
var RaiseException: Boolean);
begin
RaiseException := False;
end;
Now notice RaiseException is set to false yet the exception
flows back out
so after a few times when the user tries to close the program
it generates an error.
both the dll & the host exe are statically compiled ie no runtime
pkgs
if anyone has run into this & has a viable workaround please reply
Thanks
Pete