Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to detect broken connection
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
How to detect broken connection
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01413992
Message ID:
01413992
Views:
193
A client reports sporadic messages indicating that the connection to the SQL database has been lost. This happens after they have had the application minimized for a period of time. Upon returning to the application, the user receives a connectivity error where the only options are Cancel, Ignore and Help -- none of which allow them to continue with the application. I suspect this may be related to the "KeepAlive" feature in SQL 2005. What is the best way to detect this situation and recover from it? Every method I've tried to test the connection just generates a SQL error--regardless of how Display Warnings has been set. The application has a shared connection used by remote views and SPT and is aware of the statement handle as well the connect string used to create it.

It would seem that if SQL detects inactivity and idles (or breaks) the connection, it ought to be able to detect renewed activity and enable it--but that would be too easy :-)
Next
Reply
Map
View

Click here to load this message in the networking platform