Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Automatic reconnect to serverdb ????
Message
De
10/06/2004 05:21:18
Dorin Vasilescu
ALL Trans Romania
Arad, Roumanie
 
 
À
10/06/2004 05:13:44
Albert Beermann
Piepenbrock Service Gmbh & Cokg
Osnabrück, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00912114
Message ID:
00912116
Vues:
9
Hi
The best you can do is to set IdleTimeout for connection.
After time specified, VFP disconnects from server and reconnects next time you make any updates on server. This also will reconnect server side intrerrupted connections, but only after time specified in IdleTimeout.

In VFP9 is even better, exists SQLIDLEDICONNECT() function , which can be used to reconnect a broken SQL connection (server restarts, network problems, server automatic connection interrupts, etc)



>Hello everbody !
>
>At the beginning of my application (vfp 7.0) i connect to a serverdb (maxdb) !
>
>public p_verbindungsnr
>STORE SQLSTRINGCONNECT('dsn=maxdblokal;uid=xxxx;pwd=xxxxxx') TO p_verbindungsnr
>If p_verbindungsnr < 0
> error ....
>endif
>
>I use the connectionhandle "p_verbindungsnr" in all my sql-commands in all forms
>
>Of course i don't know how long the users stay in the application and if they are working or sleeping ;-)
>
>I some situations the maydb database disconncets the session (timeout) to avoid deadlock situations .........
>
>So i want to test the validity of the connectionhandle before each sql-command and if not do an automatic reconnect.
>
>I my application the public connectionhandle "p_verbindungsnr" is still > 0
>I don't know how to test the validity of p_verbindungsnr ??
>
>Any help welcomed
>
>Best regards
>Albert
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform