>>I have not used remote views probably since the mid 90's and am struggling on how to handle this problem. The framework I use has remote views for certain standard system tables (like the Users table) but allows me to access all my specific tables using SPT.
>>
>>I am having an issue when running my application on a Windows tablet where the connection to the database gets lost or dropped when the tablet goes into sleep mode.
>>
>>I have adjusted my SPT so that if a dropped connection is detected I retry a few times to re-connect to the database. However, I cannot work out how to do this for the remote views.
>>
>>Any ideas?
>
>You can use the following code if you found the connection has dropped (VFP9 only)
>
>
ASQLHANDLES(aSqlhndls)
>FOR EACH nOdbchdbc IN aSqlhndls
> =SQLIDLEDISCONNECT(nOdbchdbc)
>ENDFOR
>
>This will cause the connectionhandle to reconnect to the database as soon as any activity is set on the same connection handle (Both remote views and SPT).
>
>Walter,
Walter,
I have tried that code in my application's timer but it did not make any difference. If I have views that are already opened, when they requery() I still get the connection handle error. Any ideas what I may be doing wrong?