Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Remote Views and Dropped Connection
Message
De
02/04/2015 01:50:59
Al Doman (En ligne)
M3 Enterprises Inc.
North Vancouver, Colombie Britannique, Canada
 
 
À
01/04/2015 22:14:29
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:
01617676
Vues:
40
>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.

The best approach would be to address the cause, rather than the symptom.

If your tablet supports Connected Standby, that would probably be the cleanest solution. Even in "sleep" mode, the network connection would stay up: http://www.howtogeek.com/189224/how-connected-standby-works-or-why-your-windows-8-pcs-battery-drains-so-fast

The next best thing would be to prevent power management from turning off your NIC: http://blogs.technet.com/b/exchange/archive/2013/10/22/do-you-have-a-sleepy-nic.aspx . Many mobile devices by default allow NICs to be turned off, you could experiment with disabling that feature. That's no guarantee your app will continue to work: if the connection has some sort of low-level heartbeat, and your tablet in sleep mode doesn't respond to that, then the connection may be dropped at the server end anyways.

If that doesn't work, the next step is to prevent sleep, or make the inactivity timeout for sleep mode so long that it effectively never goes to sleep.

If none of that works, then you'll have to try to work around it. Probably means diving into your framework and wrapping calls in connection retries, similar to what you've done with your SPT.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform