Information générale
Catégorie:
Codage, syntaxe et commandes
>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement