Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Wireless support for VFP9 app
Message
 
To
15/11/2011 16:02:59
Hong Yew
People Quest
Malaysia
General information
Forum:
Visual FoxPro
Category:
Client/server
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2008
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01528963
Message ID:
01529044
Views:
68
>Hi all
>
>I have a VFP9 app that my client need to run on a wireless LAN
>
>Occasionally, when the connection is temporarily broken, it will crash my VFP9 app due to invalid database connection handle
>
>Is there a way for me to program a automatic reconnect should the connection handle be invalid from a temporary broken network connection?
>

I use an object that I pass all of my SQL calls through. In the Error event of the object we check to see if the error # is 1466 (Invalid connection handle) and if it is, attempt to re-connect to the database; if the reconnect is successful we call RETRY, otherwise we log the error. We also track the last error so we can prevent recursive errors from happening (so if the last error that occurred was 1466 we don't keep retrying).
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Reply
Map
View

Click here to load this message in the networking platform