Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Remote Views, Forms & Communication Link Errors
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows NT
Database:
MS SQL Server
Divers
Thread ID:
01354910
Message ID:
01354958
Vues:
21
>I use a lot of "remote views" and update the data via forms connected thru the data environment. Every thing works well (most of the time) but if a user leaves a form open over night, the next morning they will get a "communication link" error when they try to use the form. I'm sure this is related to the server being reset at night. I've suggested that they just close all forms or, better yet, the applicaiton and start it fresh the next day but, as you would guess, they often forget so my question is this:
>
>Is there some code you can place in a form that will test for a good connection to the server and if the connection has been lost, just refresh the connection before continuing. I've thought about putting a timer on each forms and forcing them to close down at mid-night but I would rather just know of a way to re-establish the comminication link without having to close and re-open the forms.
>
>Thanks,
>Robert Wright

That's something kinda tricky too pull off. What I did in the past was to create a classlib that handled at the 'requery's of my views. Had to keep track of the last/most current paramater that was used for each view too. Then I put a timer in the classlib that would auto-refresh these views every X seconds that the user had specified. Obviously if they're in "edit mode" then don't want to requery the views. Making a long story short I spent probably 3 months writing nothing but this gizmo - it was a huge undertaking - but the end result was cool - all I had to do is drag-drop my classlib onto the form and set one property and it worked. If the connection had died it would attempt to re-establish the connection, and the classlib handled all the tabelupdates as well. It's actually something I was considering putting out in the public domain for everyone at some point - but there is so much code behind it I'd really hate to have to support it these days....
ICQ 10556 (ya), 254117
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform