Sorry I did not answer the question.
>
> ASQLHANDLES(aSqlhndls)
> FOR EACH nOdbchdbc IN aSqlhndls
> =SQLIDLEDISCONNECT(nOdbchdbc)
> ENDFOR
>
>
>
>Nice trick. A few questions:
>
>1) Where do you put this- in a sqlexec() method or an object error method or ??
As explained in the previous message. Since I use the applic.SQLHandle parameter, it will probe the SQL connection before executing this command.
>2) Would sqldisconnect(0) suffice if you're closing them all?
I don't think so. I never tried.
>3) Do you ask the user whether to keep trying before you terminate the app?- J
Actually, when the application detects the connection is lost, it will throw up a wait window saying "The connection to the database is lost, trying to reconnect". The application becomes none responsive if the click the window and will eventually raise the question whether you still want to wait or quit the application.
I agree, it could be more graceful, but it is not a very common scenario as usually the lost connection is restored in seconds.
>
>Regards, J