Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Drive mappings
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00082789
Message ID:
00083408
Vues:
30
First of all I should specify that I'm working on a Novell Network and not NT. I don't specify the \\server name, just the path. Both the EXE and data are on the server to allow access from dial-in. If I was dealing with data in one place (say a server) and the EXE in another (say local) then I would probably look at an approach like yours coupled with GETFILE() in the app. However, since I have everything on the network I can simply create the same relative paths on any drive and it will work. For example, I have \DATA\TRAINING\ and \VFP APPLICATIONS\ on my C: drive containing data the data and exe for my app respectively. The same relative path is on \\FS1\SYS4\ on the network. I just copy files from my local to the server and it works. If I needed to I could create the same paths on another server or volume and copy the files.

>Well, maybe I misunderstand...
>
>What is the full directory structure hard-coded into your system? Is it \\machinename\data\myappsdata\? Or, what is it?
>
>"If I need to change servers or drives I just create the same relative path when moving the data. Both approaches work fine and I disagree with you that either one works better."
>
>How? Does this require a re-compile? Or can an end-user do this on his/her own?
>
>Joe
>
>
>>Personally I don't see any great advantage with what you've stated. Using relative paths I have a \DATA\MYAPPSDATA\ directory locally for testing (this way I can keep working even if the server goes down). I also create a \DATA\MYAPPSDATA\ on whatever server and drive the app is to run from. If I need to change servers or drives I just create the same relative path when moving the data. Both approaches work fine and I disagree with you that either one works better.
>>
>>Anyway, my main point was to not hard code drive letters in code.
>>
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada

cmagee@metroland.com

Never mistake having a career with having a life.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform