Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to know my server is on?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00465537
Message ID:
00465545
Vues:
11
Hi John

If you are working with VFP data on a fileserver, you can first do a general check, if the path to the data is ok, and the dbc is available.

FILE("myDataBase.DBC")

This will return .F., when the server or the connection is down.

The attempt to open the .dbc With OPEN DATABASE myDataBase will give you an error #1 in this case too. If you haven't the according user rights to access that .dbc you'll see an error #1705. So you can handle this in all in an error routine.

If you are working with a "real" server your attempt to establish a connection by using SQLCONNECT() or SQLSTRINGCONNECT() will return -1 if it fails.

HTH
Markus


>Hi,
> I am developing multiuser application. I faced a problem that, my application will be hang/error if the server is not switch on, not connect to network or access permission is not set properly.
> How to implement a TestConnection function to check these issue before I open database ?
>
>Thank you
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform