Because, I will use oCn:Close(), oCn:Connect() after I know the connection is lost.
There is nothing you need to do to reconnect after a connection is lost. FWH lib automatically reconnects, if possible, when you do an operation.
Example:
Open a rowset and start browsing. After editing and saving a few changes, unplug the network cable. Now edits cannot be saved and the user gets a message that the connection is lost. But still, the user can continue browsing even if there is no connection but can not edit and save.
Now restore the connection. If you edit and save any value, the connection is "automatically re-established" and the edit and save works as usual.
Because the library provides automatic reconnection, the programmer needs to do nothing.
In case the auto-reconnection feature is not working as expected in any case, please let us know the circumstances and we will fix the issue immediately for you.
Information:
1. Method Connect(): There should be no need to use this method in an application program.
2. You can use these methods to check connection status if you like, but you do not really need to:
a) oCn:Ping() : If the connection is closed previously by calling oCn:Close(), Ping() returns .f.. If not it tries to reconnect and returns if the connection is really available.
b) oCn:Check(): Even if the connection was closed earlier, it tries the reconnect and returns if the connection is really available.