[Lazarus] MSSQL howto catch a TMSSQLConnection Error without Messagebox?

2021-01-27 Thread Andreas Frieß via lazarus
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();  // <-- here is a form with showontop created and destoyed if isOk then begin   try (IsOk);   except   end;

Re: [Lazarus] MSSQL howto catch a TMSSQLConnection Error without Messagebox?

2021-01-27 Thread Mattias Gaertner via lazarus
On Wed, 27 Jan 2021 16:02:40 +0100 (CET) Michael Van Canneyt via lazarus 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     (IsOk); except end; The xxx contains a ShowModal? Mattias --

Re: [Lazarus] MSSQL howto catch a TMSSQLConnection Error without Messagebox?

2021-01-27 Thread Michael Van Canneyt via lazarus
If you don't do a re-raise, I don't understand where the dialog box comes from, since you're catching all exceptions... Michael. On Wed, 27 Jan 2021, Andreas Frieß via lazarus wrote: Hi Michael, no, i did not re-raise there. I want only a silent flag. This should done by the Result:=

[Lazarus] MSSQL howto catch a TMSSQLConnection Error without Messagebox?

2021-01-27 Thread Andreas Frieß via lazarus
Hi Michael, no, i did not re-raise there. I want only a silent flag. This should done by the Result:= false in the calling function. regards Andreas Am 27.01.2021 um 12:46 schrieb Michael Van Canneyt: On Wed, 27 Jan 2021, Andreas Frieß via lazarus wrote: On my Raspi/Debian i got on a

Re: [Lazarus] MSSQL howto catch a TMSSQLConnection Error without Messagebox?

2021-01-27 Thread Michael Van Canneyt via lazarus
On Wed, 27 Jan 2021, Andreas Frieß via lazarus wrote: On my Raspi/Debian i got on a TMSSQLConnection a messagebox if the server is not reachable. The connection is not my problem, but i am not able to cach this exeption silent without poping up this messagebox. The problem is, the messagebox

[Lazarus] MSSQL howto catch a TMSSQLConnection Error without Messagebox?

2021-01-26 Thread Andreas Frieß via lazarus
On my Raspi/Debian i got on a TMSSQLConnection a messagebox if the server is not reachable. The connection is not my problem, but i am not able to cach this exeption silent without poping up this messagebox. The problem is, the messagebox pops up and want an OK or ABORT. In my code i catch the