Configure application to find its data files in a different folder than the one in which it is running
SELECT TEST-FILE ASSIGN TO "TEST.DAT"
TEST.DAT resides in a folder called C:\datafiles.
The application is running in a folder called C:\myproject\myproject\bin\x86\debug
How can he setup his application so that TEST.DAT will be found when it is opened?
You can include the full path to the filename in the ASSIGN clause like:
SELECT TEST-FILE ASSIGN TO "C:\datafiles\TEST.DAT"
You could also change your working folder to be:
c:\datafiles on the properties page-->Debug tab.
There are many different optons to use including assigning to environment variables or to data items or using MFEXTMAP.
Please look at the docs under the File Handler section here:
One other thing that you can try is to set the environment variable COBDATA to point to the folder where your files are.
Right click on your project name and choose add->New Item and then select Application Configuration file.
Then right click on app.config under your project name and select Edit.
Set variable name to COBDATA and value to c:\datafiles
Now if your program is opening file TEST.DAT it will search for it in your data folder