Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Coding for Peer to Peer networks
Message
 
À
20/04/2001 12:20:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00497969
Message ID:
00501143
Vues:
19
>Until now most of my apps have been developed for server based LAN use, but now one of my apps is being used on a peer to peer network where the users map each others drives with their own drive letter designation. This means that hard coded references to file locations no longer works.
>I know that there is more than one approach to addressing this issue and I was wondering what is the currently recommended "guru" method.

Hey Sam. Determine the current path where the app is by using sys(2004). Store this in a sting and use it to open all of your tables and make other references.

lcPath = sys(2004)
dbpath = lcpath + "data\"

use dbpath + "trains" in 0
use dbpath + "tracks" in 0
use dbpath + "tickets" in 0

Then you never have to worry about which drive your app is on or the user has mapped.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform