|
|
|
|
|
- Overview
- .REP or list of files?
- What are REP files for?
- Example: Updating an application while modifying the analysis
- Using the .REP file programmatically
- Managing the .REP file or the list of data files
- Creating and modifying the .REP file (or the list of data files)
- Reading the .REP file
- Writing into the file
- Structure of .REP file
- Structure of .REP file
REP files
Available only with these kinds of connection
REP files contain the list of data files handled by the application. This .REP file can be used in programming by the WLanguage functions. The <MyProject>.REP file contains the list of files used by the application (identifier, logical name and full path of physical file). The GUID of the analysis is the unique identifier of the analysis linked to the project, containing the description of files. This identifier can be found in the data model editor, in the analysis description ("Options" tab). The file GUID corresponds to the identifier of logical file. This identifier can be found in the data model editor, in the data file description window ("Notes" tab).
This file is automatically created in the application directory and is populated by the HFSQL engine. ".REP" files allow you to easily locate the data files used by the WINDEV or WINDEV Mobile application. The WINDEV application automatically updates the ".REP" file but it rarely uses the ".REP" file. This file is used by all the tools that handle the data files of the application, and mainly by the automatic update of the data files, etc. Example: Updating an application while modifying the analysis When updating a WINDEV application, the automatic data file modification is automatically started if the structure of the database is modified. This procedure uses the ".REP" file to locate the physical files used by the application in order to modify them. Using the .REP file programmatically Managing the .REP file or the list of data files | | HSetREP | Enables or disables the management of .REP file
When the management of .REP file is enabled, you have the ability to specify the name and path of the .REP file. A HFREP.INI file will be created in the directory of common application data (\Application Data\PC SOFT directory). The management of ".REP" file is enabled by default. |
Creating and modifying the .REP file (or the list of data files) | | HCreation | Creates a physical data file. This function fills the .REP file if the management of .REP file is enabled. | HCreationIfNotFound | Creates a physical data file if it does not exist.
This function fills the .REP file if the management of .REP file is enabled and if the hDelayedOpening constant is not used. If the hDelayedOpening constant is specified, the .REP file will be updated during the automatic opening of the file during the first access to the file. | HOpen | Opens a physical data file and fills the .REP file if necessary | Remark: The information given by HChangeDir, HSubstDir and HChangeName is taken into account when creating and updating the ".REP" file. Reading the .REP file | | HListREP | Lists the different files found in the .REP file as well as their physical path |
Writing into the file To write into the .REP file, all you have to do is use the functions for managing the external files: The structure of the added line must be as follows: | | | | | | LOCALIZATION= | File GUID | Tabulation | Logical file name | Tabulation | Path of physical file |
| | | | | | | LOCALIZATION_CS= | File GUID | Tabulation | Logical file name | Tabulation | Physical location of the file in the HFSQL server | Tabulation | | ServerName:Port | Tabulation | ServerIP:Port | Tabulation | Database | | In an application in Unicode, LOCALIZATION_CS is replaced with LOCALIZATION_CS_UTF8: the different strings are encoded in UTF8.The GUID of the file corresponds to the identifier of the logical data file. This identifier can be found in the data model editor, in the description of the data file ("Notes" tab). Two WLanguage properties return the GUID of a data file and the GUID of the analysis that created it: | | GUIDAnalysis | Returns the GUID of the analysis that was used to create the data file. | GUIDFile | Returns the GUID of the file defined in the analysis that was used to create the data file. |
Structure of .REP file The .REP file has the following structure: - The first line contains the information regarding the analysis in which the data files have been described. This analysis corresponds to the analysis of the current project.
The structure of this line is as follows:
| | ANALYSISGUID= | Analysis GUID |
The GUID of the analysis is the unique identifier of the analysis linked to the project, containing the description of the data files. This identifier can be found in the data model editor, in the analysis description ("Options" tab). - The following lines describe the different data files handled by the application. A line is created for each physical data file handled. This line contains the following information:
| | | | | | LOCALIZATION= | File GUID | Tabulation | Logical name of data file | Tabulation | Path of physical data file |
The file GUID corresponds to the identifier of logical file. This identifier can be found in the data model editor, in the description of the data file ("Notes" tab).
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|