Yes - reuse the connection. VFP-SQL apps I've seen usually have a public variable or a form property that is assigned the connection handle at the top of the application. If that handle is lost (which I have never experienced), then something is very wrong.
ON ERROR with an AERROR() service would provide specific information about the failure. The Foxpro engineers at MS have also added TRY/CATCH features to VFP - if connectivity is an issue, you could implement these features to restablish the connection.
>Hi,
>
> Is that means you suggest to reuse the connection instead of always open and close connection?
>
>Thanks,
>
>regards,
>florence
Imagination is more important than knowledge