Forum > Database
MSSQL howto catch a TMSSQLConnection Error without Messagebox?
(1/1)
af0815:
On my Raspi 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 exception, set a flag and reraise
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} --- try if IsOk then AConnection.Connected := true; except on E : Exception do begin IsOk:=false; raise; end; end;
The calling function does this
--- Quote --- Result := false;
try
xxxxxxxx(IsOk);
Result := true;
except
on E : Exception do begin
//
end;
end;
--- End quote ---
So the exception should silent catched and i can handle if a connection is ok or not.
How can i avoid this unwanted box
Navigation
[0] Message Index