Modifies the search mode of physical data files (.FIC, .NDX, ...). By default, the physical data files are sought in the application library then on disk.
Reminder: The physical data files can be found:
- on disk (most common case).
- in the WINDEV libraries (WDL files).
- in the executable.
- in a component.
// Find data files in libraries 4, 6 and 9
CustomerFile.ChangeLocation(hWDL, 4, 6, 9)
<Result> = <Source>.ChangeLocation(<Search mode> [, <Parameters>])
- True if the operation was performed,
- False if a problem occurs. HError is used to identify the error.
is used, <Result> = True
, but the function has no effect: the data files used are always found on the server.
<Source>: Type corresponding to the specified source
Name of the data file (defined in the analysis).
Caution: the affected data files are automatically closed.
<Search mode>: Constant
Configures the search mode of data files:
|hDisk||The data files are sought on disk only. This is the most common case.|
|The data files are sought:|
- In the main WDL;
- If <Parameter> is not specified: Searches for the data files in the WDLs according to the load order, then on disk.
If <Parameter> is specified: Searches for the data files in the specified WDLs, then on disk.
- In the main WDL of the component.
- In the secondary WDLs of the component according to the load order.
<Parameters>: Optional character string
Identifier of the WDLs where the search must be performed. These WDLs must be loaded by LoadWDL that returns the identifier of the WDL.
Why include the data files in a library?
Including the data files in a library presents the following benefits:
- protecting data: the data files are accessible in read-only.
- grouping data: all the files required by the execution are grouped in a single file.