How to test if a TConnection is active before reading data.
Posted: 12.07.2010, 12:23
Is there a way of testing when a TZConnection is active when the network is down?
The TZConnection.Connected property is true even when the network connection is down, and it doesn't seem to change when an attempt to connect to the database fails.
Isn't there a way of monitoring the TZConnection rather than trying to open a table and realizing that the connection is down?
Is there also a way of trapping the exception when you try to open the table when there is no connection? I try testing for E:EZSQLException but it doesn't seem to catch everything.
The TZConnection.Connected property is true even when the network connection is down, and it doesn't seem to change when an attempt to connect to the database fails.
Isn't there a way of monitoring the TZConnection rather than trying to open a table and realizing that the connection is down?
Is there also a way of trapping the exception when you try to open the table when there is no connection? I try testing for E:EZSQLException but it doesn't seem to catch everything.