ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / HFSQL functions
  • Priority for defining the location of log files
  • The log file exists when <Source>.ChangeLogDir is used
  • Miscellaneous
  • Replication and log process
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Modifies the location of log files corresponding to an HFSQL data file (*JNL files as well as JournalOperation and JournalIdentification files if they exist).
Reminder: JournalOperation and JournalIdentification files are created only:
  • if the management of replication is requested for the data file.
  • if the management of the selected log corresponds to "Write-to-file log and history of accesses".
The *JNL file is not created if only the log of access history is requested.
By default, the physical files corresponding to the logs are created:
  • in the directory specified in the analysis ("Analysis description", "Logging" tab).
Analysis
  • in the specified directory when describing the data file ("Data file description" option in the context menu, "Logging" tab). This option is available only if the analysis directory corresponds to "<Default file directory>".
Option in the analysis
HFSQL Client/Server The location of log files cannot be modified. This function is ignored. The location of the log is configured in the HFCONF.INI file.
Hyper File 5.5 This function has no effect and it always returns True.
Example
// The "Customer" data file has a log
Customer.ChangeLogDir("\\MyServer\Log\JNL", "\\MyServer\Log\Operation")
...
Customer.Add()
// -> the "CustomerJNL" file is opened 
// in the "\\MyServer\Log\JNL" directory
//-> the "JournalOperation" and "JournalIdentification" files 
// are opened in the "\\MyServer\Log|Operation" directory
...
Syntax
<Result> = <Source>.ChangeLogDir(<JNL file location> [, <LogOperation file location> [, <Backup location>]])
<Result>: Boolean
  • True if the operation was performed,
  • False if a problem occurs. HErrorInfo is used to identify the error.
<Source>: Type corresponding to the specified source
Name of the data file whose log must be moved. This is the logical name of the data file (defined in the data model editor).
<JNL file location>: Character string
New access path to JNL file associated with the file with logs (full or relative path).
If this parameter corresponds to an empty string (""), the current file location is not modified.
<LogOperation file location>: Optional character string
New path for JournalOperation file and JournalIdentification file associated with log data file (full or relative path). The JournalOperation file contains all the operations performed on the logged data file.
If this parameter is not specified or is an empty string (""), the current file location is not modified.
<Backup location>: Optional character string
Path of backups of log files. By default, this path corresponds to: <répertoire des fichiers JNL>\__JNLBackup
This path is used during the automatic data file modification to archive the logs. <Source>.HistoryModification will also search for change history in these files.
If this parameter corresponds to an empty string (""), the current location is not modified.
If this parameter corresponds to a relative path (and starts with a dot), the path will be relative to data files.
Remarks

Priority for defining the location of log files

The location of log files is defined according to the following priority order:
  1. Location specified when creating the log data file (function <Source>.Creation).
  2. Location specified by <Source>.ChangeLogDir.
  3. Location specified in the analysis.
  4. Location of the logged data file.

The log file exists when <Source>.ChangeLogDir is used

If the log file already exists when you call the function <Source>.ChangeLogDirfunction, this log file is no longer used: a log file is created at the specified location and associated with the logged HFSQL data file.
Using the <Source>.DeclareExternal function with a logged data file If an application uses the <Source>.DeclareExternal function on a logged data file, changes made by this application are recorded in the log files specified in the header of the logged HFSQL data file.

Miscellaneous

  • If the data files are opened when the directory is modified, the data files are automatically closed.
  • If the path of the log is redefined several times by <Source>.ChangeLogDir, only the last path is used. The change is effective for all applications using the log file.

Replication and log process

If <Source>.InitSubscriber is used, the location of logs and operation tables must also be initialized (<Source>.ChangeLogDir, LogDirectory and OperationLogDirectory).
Reminder Replication is based on logs and tables of operations in data files. The replication fails if the location of the logs and operation tables is invalid.
Component: wd300hf.dll
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 11/22/2024

Send a report | Local help