Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Distributing my App
Message
 
 
À
01/06/2001 12:44:41
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00513868
Message ID:
00513938
Vues:
16
>Thanks Mark,
>
>But I still need a little more direction. I am not that proficient in programing. If I don't do a Set Path command in my main the app gives an error that it can't find the dbc. If I add the Set Path and this path is different from the directory in which the app is installed I have the same problem.

For stand-alone:
lcInstallDir = sys(5) + sys(2003)
lcPath = lcInstallDir + ";" + addbs(lcInstallDir) + "Data;" + addbs(lcInstallDir) + "Reports"
set path to &lcPath
For multi-user:
use appuser
lcInstallDir = sys(5) + sys(2003)
lcDataDir = alltrim(appuser.datapath)
use
if not file(addbs(lcDataDir) + "Data\mydbc.dbc")
   do form GetDataPath to lcDataDir  && modal form
endif
if empty(lcDataDir)
   return .f.  && quit the app
endif
lcPath = lcInstallDir + ";" + addbs(lcDataDir) + "Data;" + addbs(lcDataDir) + "Reports"
set path to &lcPath
If the path to the data can not be found, I prompt the user to locate the data using a form and a GetFile("Database:DBC") prompt. I then use the JustPath(JustPath()) function [yes twice] to just return the path part to the folder just above the Data folder. I then store that value in a user table in the application installation folder.
Mark McCasland
Midlothian, TX USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform