[Lazarus] MSSQL howto catch a TMSSQLConnection Error without Messagebox?
Andreas Frieß
friess at gmx.at
Wed Jan 27 20:42:24 CET 2021
No, befor the try is a ping to test if the server itself is reachable.
This is done with a 'ShowOnTop' Form - but not showmodal. It looks like
isOk := pingtheserver(xxxx); // <-- here is a form with showontop
created and destoyed
if isOk then begin
try
xxxxxxxx(IsOk);
except
end;
end;
No showmodal inside the try/except block. But i will check if i need the
re-raise in the inner block.
Andreas
Am 27.01.2021 um 16:12 schrieb Mattias Gaertner via lazarus:
> On Wed, 27 Jan 2021 16:02:40 +0100 (CET)
> Michael Van Canneyt via lazarus <lazarus at lists.lazarus-ide.org> wrote:
>
>> If you don't do a re-raise, I don't understand where the dialog box
>> comes from, since you're catching all exceptions...
> Maybe
>
> try
> xxxxxxxx(IsOk);
> except
> end;
>
> The xxxxxxx contains a ShowModal?
>
> Mattias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot 2021-01-15 113833.jpg
Type: image/jpeg
Size: 25014 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20210127/32f048d6/attachment-0001.jpg>
More information about the lazarus
mailing list