Re: Cant trap Exception.
- From: "Karl A. Sorensen" <kas@[REM]kamstrup-ems.no>
- Date: Tue, 19 Feb 2008 11:47:12 +0100
Thanks yannis!
Just found the problem. Yesterday, I had some other problems, and then I put
in an event handler for AfterConnect. In this event handler I had a
"ShowMessage(Error.Message), and it was this message box I was seeing.
Pretty embarrassed here now:) When removing my ShowMessage, my code works
fine.
regards
Karl
"yannis" <none@xxxxxxxxxx> wrote in message
news:mn.9aeb7d8233b63fd3.0@xxxxxxxxxxxxx
Karl A. Sørensen laid this down on his screen :
Any idea on how to catch this exception (removing the message box) ?
Yes.
1) Close the connection object (lConnection.Connected := false) from you
designer before compiling your project.
2) change the exception handling code from
except
iRetVal := 0;
end;
To
except
On E:Exception do
begin
iRetVal := 0;
end;
end;
Regards
Yannis.
--
You talk a great deal about building a better world for your children, but
when you are young you can no more envision a world inherited by your
children than you can conceive of dying. The society you mold, you mold
for yourself.
----Russell Baker-------
.
- Follow-Ups:
- Re: Cant trap Exception.
- From: Del Murray
- Re: Cant trap Exception.
- References:
- Cant trap Exception.
- From: Karl A. Sørensen
- Re: Cant trap Exception.
- From: yannis
- Cant trap Exception.
- Prev by Date: Re: Using TADOQuery for select using two tables
- Next by Date: Re: Cant trap Exception.
- Previous by thread: Re: Cant trap Exception.
- Next by thread: Re: Cant trap Exception.
- Index(es):