>>************************************************************************************************ >>* >>* Routine for setting the database directory location for the form >>* >>FUNCTION SetDBCPath >>LPARAMETERS poFormDE,pcDBCPath,pcDBCName >>LOCAL lcDBCName, lcFilePath, lnNumCursors, lnNdx >>lcDBCName = FORCEEXT(pcDBCName,"DBC") >>lcFilePath = ADDBS(pcDBCPath) + lcDBCName >>lnNumCursors = AMEMBERS(lcProperties,poFormDE,2) >>FOR lnNdx=1 TO lnNumCursors >> IF UPPER(LEFT(lcProperties[lnNdx],6)) = "CURSOR" >> IF ATC(lcDBCName,poFormDE.&lcProperties[lnNdx]..database) > 0 >> poFormDE.&lcProperties[lnNdx]..database = lcFilePath >> ENDIF >> ENDIF >>ENDFOR >>ENDFUNC >>>>
>>SetDBCPath(this,gcDBCPath,"Data") >>>>
>>************************************************************************************************ >>* >>* Routine for setting the free table directory location for the form >>* >>FUNCTION SetDBFPath >>LPARAMETERS poFormDE,pcDBFPath >>LOCAL lnNumCursors, lnNdx, lcDBFName >>LOCAL ARRAY lcProperties[1] >>lnNumCursors = AMEMBERS(lcProperties,poFormDE,2) >>FOR lnNdx=1 TO lnNumCursors >> IF UPPER(LEFT(lcProperties[lnNdx],6)) = "CURSOR" >> IF EMPTY(poFormDE.&lcProperties[lnNdx]..database) >> lcDBFName = JUSTFNAME(poFormDE.&lcProperties[lnNdx]..CursorSource) >> poFormDE.&lcProperties[lnNdx]..CursorSource = pcDBFPath + lcDBFName >> ENDIF >> ENDIF >>ENDFOR >>RETURN >>ENDFUNC >>>This is neat, however...
*s.prg Close Databases All Clear All Public oApp oApp = Newobject('myApp','main.prg') *c.prg CLOSE DATABASES all CLEAR ALL Clear progJust creation of oApp is sufficient because it reads "working" DBC and Data folder from a local file (and restores to default development DBC,path upon destroy due to c() call when I'm done).