Link to home
Start Free TrialLog in
Avatar of tyfing
tyfing

asked on

Client/Server

when my client programme attempts to connect to the server which is currently not online as the PC is not switched on, an error occurs. my question is how do i stop any error messages from popping up should my client attempts to connect to the server, which at that point of time, is currently offline.
Avatar of hagur
hagur

You could try using the Try ... Except statement.

Example:

Try
  //Attempt to connect
Except
  //Display a message if you like, or do nothing ...
End;


Although an error message will be displayed when running the program through the Delphi IDE, this should work when you try to run the application from windows, (not through Delphi.)

You should also look into the onError events, if you are using the Client/Server components that are included with Delphi.
ASKER CERTIFIED SOLUTION
Avatar of Cesario Lababidi
Cesario Lababidi
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial