ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / Automatic data modification
  • Overview
  • WDModFic
  • Starting WDModFic
  • Required files
  • Using WDModFic in command line mode
  • Examples
  • Using WDModFic in interactive mode
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
WDModFic : Tool for automatic modification of data files
HFSQL ClassicHFSQL Client/ServerAvailable only with these kinds of connection
Overview

WDModFic

WDModFic is a tool used to perform the automatic modification of the data files found on the development computer and on the end-user computers.
By default, the automatic data file modification is performed on the end-user computers or on the deployment computer of the site when updating applications. However, in some cases (data files located on a laptop computer not connected to the network when the update was performed, failed update, and so on), WDModFic must be used to to perform this automatic modification once the application was updated.
Caution: The use of WDModFic must be limited to advanced users (the application administrator for example).
Reminder: The automatic data modification is used to apply the modifications performed in the HFSQL analysis to the data files. For more details, see Automatic data file modification.
Use conditions: WDModFic is not automatically installed with the applications developed with WINDEV or WEBDEV. The WDModFic.exe file must be selected along with the necessary files (see the next paragraph) when creating the setup.
The license agreement of WINDEV and WEBDEV is fully enforced.
Remark: The automatic data file modification can also be done through programming with HModifyStructure.
Starting WDModFic
WDModFic can be started:
  • in command line mode (without displaying the wizard of WDModFic). HFSQL Classic or HFSQL Client/Server data files can be modified.
  • in interactive mode (while displaying the wizard of WDModFic):
    • on the "Analysis" tab, in the "Analysis" group, expand "Synchronization" and select "Synchronize Structure and Deployed Data (SDD, Auto Modif...") (from the data model editor on the development computer only).
    • run "WDModFic.EXE" directly.

Required files

The following files are required to run WDModFic on a client computer:
  • wd290cpl.dll
  • wd290hf.dll
  • wd290obj.dll
  • wd290pnt.dll
  • WDOutil.WDK
  • wd290std.dll
  • wd29 0trs.dll (required only if the files are replicated)
  • wd290vm.dll
  • WDMod290.DLL
  • WDModFic.Exe
  • wd290mat.dll
  • wd290prn.dll (required for printing)
Using WDModFic in command line mode
To perform an automatic modification of the data files, the syntax is as follows:
WDModFic.EXE [-subdir][-report][-error][-wizard][-nobackup][-noprogress][-nolink]
[-noanaguid][-noanaconnection]
/WDD=<WDDPath>
/PWD=<WDDPassword>
/DIR=<DataFileDir>
/FILE=<DataFile>
/FILEPWD=<FilePassword>
/PRJ=<ProjectName>
/SERVER=<HFSQLClientServerDatabase>
/US
Details of parameters:
ParameterMeaning
-subdirIf this parameter is specified, the data files are searched in the specified directory ("/DIR" parameter) and its subdirectories.
By default, if this parameter is not specified, the data files are only searched in the specified directory ("/DIR" parameter)
-reportIf this parameter is specified, a status report will be displayed at the end of the automatic modification of the data files.
If this parameter is not specified, no status report will be displayed at the end of the automatic modification of the data files.
-errorIf this parameter is specified, when an error occurs, a message will be displayed at the end of the automatic modification of the data files.
If this parameter is not specified, no error message will be displayed at the end of the automatic modification of the data files.
-wizardIf this parameter is specified, the wizard for automatic modification of the data files will be started.
By default, if this parameter is not specified, the wizard for automatic modification of the data files will not be started.
-nobackupIf this parameter is specified, the automatic backup of the modified data files will not be performed.
By default, if this parameter is not specified, the automatic backup of the modified data files will be performed.
-noprogressIf this parameter is specified, no progress bar will be displayed during the automatic modification.
-noanaguidIf this parameter is specified, the automatic modification of the data files will be applied to the descriptions of the files that do not belong to the current analysis (when re-creating the description of a file or when re-creating an analysis for example, ...).
To perform the automatic modification, the HFSQL engine will use the logical name of the data file. After the automatic modification of the data files, the files become linked to the analysis.
-nolinkIf this parameter is specified, the automatic data file modification will not create the integrity links when updating the HFSQL Client/Server database.
By default, this parameter is not specified: the automatic modification of data files creates (if necessary) the integrity links when updating the HFSQL Client/Server database.
-noanaconnectionIf this parameter is specified, the automatic modification will not use the connections defined in the analysis.
By default, the automatic modification of data files will use the connections defined in the data model editor.
-nobackgroundIf this parameter is specified, no "hot" automatic modification will be performed.
In Client/Server mode, this parameter allows you not to ask for a password when the data files are password protected without being encrypted.
/WDD=<WDDFile>Character string containing the name and full path of the analysis file (".WDD" file) that describes the new structure of the data files.>.
This parameter is mandatory except if the "-wizard" parameter is specified.
/PWD=<WDDPassword>Character string containing the runtime password of the specified analysis (password defined in the analysis description).
This parameter must be specified only if the analysis is password protected.
/DIR=<DataFileDir>Character string containing the directories where the data files to update will be searched. Only the data files that must receive an automatic modification will be taken into account.
If this parameter is specified, the "/FILE" parameter must not be specified.
If the data files to update are found in different directories, WDModFic must be run for each directory.
Remark: If ".REP" files are found in this directory, the location of the data files specified in these ".REP" files will also be taken into account.
/FILE=<DataFile>Character string containing the name and full path of the data file (".FIC" file) to update.
If this parameter is specified, the "/DIR" parameter must not be specified.
If several data files must be updated, WDModFic must be run for each file.
/FILEPWD=<FilePassword>Character string containing the password of the specified data file (password defined by HPass, HCreation or HCreationIfNotFound, or during a previous automatic data modification).
This parameter must be specified only if the specified data file is password protected.
Remark: The password of a data file can only be modified in interactive mode.
/PRJ=<ProjectName>Character string containing the name of the project to use (without its path).
If the "-PDA" parameter is specified and if the "-wizard" parameter is not specified, this parameter is mandatory.
/USIf this parameter is specified, the screens of the interactive mode of WDModFic are displayed in English.
If this parameter is not specified, the screens are displayed in French.
/SERVER=<HFSQLClientServerDatabase>Character string in the following format: [<username>[:<password>]@]<server>[:<port>]/<DataBase>
In this string:
  • <login> corresponds to the login of the user
  • <password> corresponds to the password of the user.
  • <server> corresponds to the name of the HFSQL server. This parameter must be specified.
  • <port> corresponds to the port number of the HFSQL server. This parameter is optional. The port 4900 will be used by default.
  • <Database> corresponds to the name of the HFSQL Client/Server database. This parameter must be specified.
Example: /SERVER=Flo:pass@HFServer/MyDatabase
Remark: Quotes must be used if space characters are found in the name of the database. Example: /SERVER="Flo:pass@HFServer/My Database"
Remark: The table below presents the different parameters that can be used to start WDModFic in command line mode. To get these parameters when starting WDModFic, use one of the following syntaxes:
- WDModFic.EXE /help
- WDModFic.EXE /?

Examples

  • The following command line is used to apply the changes made in the analysis "D:\MyApplication\MyAnalysis.WDD" to the data files found in "C:\MyDataFiles" and in its subdirectories ("-subdir" parameter). If an error occurs, a message is displayed at the end of the automatic modification of the data files ("-error" parameter). The wizard for automatic modification of the data files will not be started. A backup will be performed for the modified data files. Example:
    ExeRun("C:\MyDirectory\WDModFic.EXE -subdir -error " + ...
    "/WDD=D:\MyApplication\MyAnalysis.WDD " + ...
    "/DIR=C:\MyDataFiles")
  • The following command line allows you to apply the modifications performed in the analysis named "D:\MyApplication\MyAnalysis.WDD" to the "C:\MyDataFile.FIC" data file. A success or error message will be displayed at the end of the automatic modification of the data files ("-report" parameter). The wizard for automatic modification of the data files will not be started. The backup of the modified data files will not be performed ("-nobackup" parameter).
    ExeRun("C:\MyDirectory\WDModFic.EXE -report -nobackup " + ...
    "/WDD=D:\MyApplication\MyAnalysis.WDD " + ...
    "/FILE=C:\MyDataFile.FIC")
  • Using long names: The quotes must be doubled when using long names.
    The following command line is used to apply the modifications performed in the "D:\MyWinDevApplication\MyAnalysis.WDD" analysis into the data file named "C:\MyDataFile.FIC". A success or error message will be displayed at the end of the automatic modification of the data files ("-report" parameter). The wizard for automatic modification of the data files will not be started. The backup of the modified data files will not be performed ("-nobackup" parameter).
    ExeRun("""C:\My Application Directory\WDModFic.EXE -report -nobackup " + ...
    "/WDD=D:\My WINDEV Application\MyAnalysis.WDD " + ...
    "/FILE=C:\MyDataFile.FIC""")
  • Using WDModFic for an HFSQL Client/Server database
    // Parameters for the automatic modification of files
    // Directory that contains WDModFic
    sWDModFicDirectory is string = "C:\Program Files\WinDev 2024\Programs\"
    // Full name of WDD with its path (in the same directory)
    sFullWDDName is string = CompleteDir(fExeDir())+"MyAnalysis.wdd"
    // User and password on the HFSQL server
    // (with rights to modify the structure of the files)
    sUser is string = "guest"
    sPassword is string = ""
    // IP address or DNS name of the computer hosting the HFSQL server
    sAddressOrNameHFServer is string = "ComputerName"
    // Port of HFSQL server
    sPortNumHFServer is int = 4900
    // Name of the database where the files to modify are found
    sDatabaseName is string = "MyAnalysis"
    sCommandLine is string
    // Build the command line 
    // Remove /report to avoid displaying a dialog box at the end
    sCommandLine = StringBuild([
    "%1WDModFic.exe" /WDD="%2" /SERVER="%3:%4@%5:%6/%7" -report
    ], CompleteDir(sWDModFicDirectory), ...
    sFullWDDName, sUser, ...
    sPassword, sAddressOrNameHFServer, ...
    sPortNumHFServer, sDatabaseName)

    // For test, you have the ability to display the command line
    // to perform a visual check
    // //Info(sCommandLine)
    // Start the automatic modification while waiting for the end
    IF NOT ExeRun(sCommandLine, exeActive, exeWait) THEN
    // Launch failure, display the error
    Error("Unable to run the automatic data modification: ", ErrorInfo(), ...
    "Command line used: ", sCommandLine)
    ELSE
    // Automatic modification performed
    END
  • Example that uses variables to define the different paths.
    ModFicDir is string
    AnalysisDir is string
    DataDir is string
    ModFicDir = """C:\WINDEV\Programs\WDModFic.EXE"""
    AnalysisDir = """C:\My Projects\CRM\Exe\CRM.wdd """
    DataDir = """C:\My Projects\CRM\Exe\Data"""

    ExeRun(ModFicDir + " -subdir -nobackup -" + "/WDD=" + AnalysisDir +"/DIR=" + DataDir, exeActive, exeWait)
Using WDModFic in interactive mode
The wizard of WDModFic is started when WDModFic is started:
  • in interactive mode:
    • on the "Analysis" tab, in the "Analysis" group, expand "Synchronization" and select "Synchronize Structure and Deployed Data (SDD, Auto Modif...") (from the data model editor on the development computer only).
    • run "WDModFic.EXE" directly.
  • in command line mode with the "-wizard" parameter.
To perform the automatic modification of the data files with the wizard:
  1. Select the analysis (".WDD" file) that describes the new structure of the data files.
    Remark: If the specified analysis is protected by a password at runtime, enter this password.
  2. Select the data files (".FIC" files) to update.
  3. To save the data files before performing the automatic modification, check "Perform a backup before modification" and select the backup directory.
  4. To specify or modify the passwords of the different data files to update, check "I want to enter or change passwords for the new structures", select the desired data files and enter the corresponding password twice.
  5. Validate to start the automatic modification.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/07/2023

Send a report | Local help