Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Remote Views and Dropped Connection
Message
De
07/04/2015 15:40:14
 
 
À
02/04/2015 02:41:19
Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8.1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01617671
Message ID:
01617969
Vues:
30
>>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?
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform