Check SQLIDLEDISCONNECT() function.
>
>I have a C/S app on VFP 9.0
>
>I noticed that if I leave the app for a while, the DB connection sometimes becomes
>invalid and if user clicks on the app that cause a data access to MSSQL, a "Non Recoverable error
>message" will be displayed.
>
>Is there a way to detect a DB connection has dropped off and auto log out the
>users from the app? Or alternatively, how can I detect the problem and auto
>reconnect again?
>
>Your advice much appreciated.
>
>Many Thanks & Best Regards
--sb--