ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL
  • Overview
  • .REP or list of files?
  • What are REP files for?
  • Example: Updating an application while modifying the analysis
  • Using the .REP file through programming
  • 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
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
REP files
HFSQL ClassicHFSQL Client/ServerAvailable only with these kinds of connection
Overview
REP files contain the list of data files handled by the application.
This .REP file can be used in programming by the WLanguage functions.
.REP or list of files?
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 description window of file ("Notes" tab).
This file is automatically created in the directory of the application and it is filled by the HFSQL engine.
What are REP files for?
".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 through programming

Managing the .REP file or the list of data files

HSetREPEnables 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)

HCreationCreates a physical data file. This function fills the .REP file if the management of .REP file is enabled.
HCreationIfNotFoundCreates 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.
HOpenOpens 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

HListREPLists 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 GUIDTabulationLogical file nameTabulationPath of physical file
LOCALIZATION_CS=File GUIDTabulationLogical file nameTabulationPhysical location of the file in the HFSQL serverTabulation
ServerName:PortTabulationServerIP:PortTabulationDatabase
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:
GUIDAnalysisReturns the GUID of the analysis that was used to create the data file.
GUIDFileReturns the GUID of the file defined in the analysis that was used to create the data file.
Structure of .REP 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 GUIDTabulationLogical name of data fileTabulationPath 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).
Example of .REP file:
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/13/2023

Send a report | Local help