Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Directory names and the DBC
Message
De
25/10/1998 09:09:25
 
 
À
24/10/1998 19:58:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00150240
Message ID:
00150292
Vues:
20
Jim:
the dataenvironment saves the full path of the tables, so vfp looks exactly for it. If your tables reside in other directory and you set path to it, make sure that a directory with the name of the developing time dir does NOT exist.

but that´s not a real solution. try this:

1. set path to (your app new dir)
2. In the beforeopentables event of every data environment, put the following code.

if you use a custom class for your forms, put this code in a new method of the class, and call it from beforeopentables in every form. It must be done this way due to dataenvironment not available in form classes.

m.UseDataEnv = (TYPE("THISFORM.DataEnvironment") = "O")
IF m.UseDataEnv
nTotMem = AMEMBERS(aMems,THISFORM.DataEnvironment,2)
WITH THISFORM.DataEnvironment
* Check for cursors
FOR i = 1 TO m.nTotMem
IF UPPER(EVAL("."+aMems[m.i]+".BaseClass")) = "CURSOR"
M.NOM_CURSOR = AMEMS(M.I)
M.DBF_PARENT = .&NOM_CURSOR..DATABASE && Guarda el nombre de la dbc
M.DBF_PARENT = SUBSTR(M.DBF_PARENT,RATC("\",M.DBF_PARENT) + 1) && Le quita el directorio
IF NOT EMPTY(M.DBF_PARENT) AND FILE (M.DBF_PARENT)
.&NOM_CURSOR..DATABASE = M.DBF_PARENT && Le indica la dbc sin path, para que tome el path actual.
ENDIF
ENDIF
ENDFOR
ENDWITH
ENDIF



>Does the directory name used during development have to follow to the distributed exes? I have just started working in VFP5 and am attempting to distribute and exe and I kept getting errors about the database container and corrupt or invalid indexes. Once I changed the directory name to the same one I used in development it worked fine.
>
>So, am I restricted to using the same directory name on all the distribution sites or is there a work around I'm not aware of? Thanks for all suggestions.
>
>Jim
There´s a better life... Just it´s more expensive!
Cristóbal Manrique M.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform