Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Wanting to go from Drive Letter to UNC any advice
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00153439
Message ID:
00153645
Vues:
26
>>my VFP search path that is fairly long, but I intend to make it shorter by including more constants and have a table that stores system locations for me. Thanks for your time on this.
>
>Hey Bret I would really be interested in seeing an example of how you do this if you don't mind sharing :)

I reduced my search path to just the DATA directory, HELP directory, and a RESOURCE directory. The rest of the path information for the rest of my systems are stored in a table located in the main apps DATA directory called appinfo. This table has entries that detail the app name, system drive (now UNC), system path, executable name, etc.. When I need to find out information about a certain system I just call a method that is in my application object called oApp.GetAppInfo. I pass it the system I am interested in and the info I am requiring. E.G. RiscrTempDir = oApp.GetAppInfo('RISCRS','TEMPDIR') will return '\\402fs1\data\riscrs\temp', I can then use it to create any temp file I need in order to process a Riscrs drawing (RISCRS is Rastor Image Storage, Conversion, and Retrieval System). The appinfo table is created/populated from an INI file that resides on the user's machine for those running my application standalone or by the System Administrator for those running it across our Network. The modifications I made to use UNC values was to separate the system drive from the path of the system, it was an extra INI call for each system, but that was nothing.

My main system can call up to 18 sub systems, depending on what is installed. The people in charge want it to be flexible enough to have the data on a network, on the local machine, or on a CD in the persons CD drive.

That is why I developed the system to use a single table that is adjusted (if need be) at startup that provides all the needed path info to me whenever I make the oApp.GetAppInfo method call.

By using the UNC I can now export my app to other departments who already have drives mapped that we are using, the UNC frees me up from the drive letter restriction and lets other departments just map were ever they want and the appinfo table knows that the data is on \\402fs1\data drive and \VFApps path.

If you have anymore questions feel free.
Bret Hobbs

"We'd have been called juvenile delinquents only our neighborhood couldn't afford a sociologist." Bob Hope
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform