Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I setup, so that users can pick the directory?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00064928
Message ID:
00064943
Vues:
35
>>>I am wondering, how I can set up so that users can pick their won default directory?
>>>Basically this is what I would like to do.
>>>
>>>1. Store the database and all tables on the server.
>>>2. Store the executable and all temp files locally. (This would include the forms etc. as well.)
>>>
>>>I am developing an application that will need to work accross an ISDN link to a remote site. I think that I would get the fastest response for the remote user, if I gave them local copies of the executable.
>>>
>>>So I think what I need to know is how do I allow for this to happen?
>>>
>>>I am developing on a stand alone machine at home. Do I set up a table that must be filled at run time, stating paths, etc.
>>>Or is there some foxpro commands that I should be using? (I am not sure how home() etc work. With an executable, home() returns the location of the esl file, which is c:\windows\system on my machines.)
>>>
>>>Any help, enlightenment would be usefull.
>>>
>>>Mike
>>
>>Mike,
>>
>>The easiest way to do this may be via the use of the COMMAND configuration setting. Simply set it similar to:
>>
>>COMMAND = DO myprog.prg
>>
>>In the program have the line
>>
>>SET DEFAULT TO GETDIR()
>>
>>This will bring the the get directory dialog. You might wish to use the parameters to give them an appropriate prompt and perhaps set the directory initially to some default setting.
>>
>>hth,
>>
>>George
>
>Valuable information George and I am not too concerned about showing the directory dialog. I am more interested in doing it under program control. When using setup, it asks you for a directory. Also, how do I have the app. reference the database that is stored on the network server, when during development it was on my local drive?
>
>Mike

Sorry if I misunderstood your question. You can use SYS(5) + SYS(2003) to determine the directory when the application initially starts. If the ESL file is installed in the same directory, alternatively, you could use SYS(2004).

As far as referencing the database (DBC), having the development version locally does present some problems. However, if I recall correctly references to the tables are all relative, so if you set up the local directory structure to match the intended structure on the network, you'll bypass, at least, most of the pitfalls. Many corporations set up a standardized directory structure for in house products. Getting with the network admin person will give you information regarding how to set your local drive up.

In regards to table locations, what I've done is to eliminate the drive reference to the table. Since a user's network path could be anyone of a number of drives, I created a program to search the network drive mappings to locate the table. Once the table is found, I can set an application property to indicate the drive reference.

hth,

George
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform