Having a VFP appl. in a directory and the data in other.
Several types of solutions exist. In the first, the path to the tables (DBF's) and indexes (CDX’s or IDX’s) stays ‘hardcoded’ in the EXE and in the second it is possible to determine it in a dynamic way.
Several types of solutions exist. In the first, the path to the tables (DBF's) and indexes (CDX’s or IDX’s) stays ‘hardcoded’ in the EXE and in the second it is possible to determine it in a dynamic way:
1. - For the executable to take the tables (DBF's) of other directory that is not local, some event of some of the first objects that are executed during the application must be included (before accessing a table):
DBASE SET PATH TO <dir of the DBF's>
2. - Another solution is to create a PROGRAM.PRG:
PARAMETER gx_xdir
SET PATH TO &gx_xdir
RETURN
and include in some event of some of the first objects that are executed during the application (before accessing a table):
call('PROGRAM', <dir of the DBF's>)
where:
<dir of the DBF's>: can be an attribute or a variable.
3. - It is also possible to include in the config.fpw:
SET PATH TO <dir of the DBF's>
4. - In Visual FoxPro a standard program exists: GX_DSSET.PRG. Its aim is to aggregate the different Visual FoxPro settings. So another possible solution is to edit such program and add the SET PATH ... command.