Dear Claudio H:
On Thursday, May 26, 2022 at 9:18:22 AM UTC-7, Claudio H wrote:
What's the best way to check if an active connection is still alive?
I might guess the connection is probably dropped by leaving the app
in an idle state for too long beyond the server timeout.
I don"t use SQLRDD. https://groups.google.com/g/comp.lang.xharbour/c/WP4_mdhz9hc/m/MYpH0PKubqYJ
SR_GetConnection( nConnection )
Obtain the connection object to <nConnection>
... might throw a detectable error.
Get the active connection number
... might not return a valid (or recorded) connection number.
SR_SetActiveConnection( nCnn )
Set the active connection number
... might be used at the heart of a "keep alive" function? Prevent timeouts, maybe.
Alternatively, you could close any connections when entering a menu, and auto-close editing sessions to return to a menu state after so may minutes idle.
May have been more functionality added in 14 years...
David A. Smith
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)