>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).