Change the setting that determines the X# search path for opening files.
XSharp.Core (in XSharp.Core.dll) Version: 2.16
SetPath() allows commands and functions that open database and associated files to find and open existing files in another drive and/or directory.
It does this by specifying a path list to search if a referenced file cannot be found in the default directory.
When you attempt to access a file without specifying its path, X# first searches the default drive and directory.
The default drive and directory are established by Windows when your application is loaded, or, during execution, by the SetDefault() function.
If the file is not found, X# then searches each path in the specified path list until the first occurrence of the file is found.
To create new files in another drive or directory, use SetDefault() or explicitly declare the path when specifying the new file name.
Note: Certain commands and functions that open files do not respect the SetPath() setting.
These cases are noted explicitly in the documentation for those commands and functions.
This example sets two paths for opening files:
This example configures a path setting at runtime by passing a DOS environment variable to a program, retrieving its value with GetEnv(), then setting the path with this value.
For example, in DOS:
1SET VO_PATH = c:\apps\data;c:\apps\progs
Later in the configuration section of your application prograO: