ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Tools / WDOptimizer
  • Overview
  • Canceling file changes made in a transaction
  • Canceling file changes made in a transaction
  • Freeing records held by a transaction
  • Freeing records held by a transaction
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
WDOptimizer: Rolling back a transaction/Freeing records held by a transaction
HFSQL ClassicAvailable only with this kind of connection
Overview
WDOptimizer is used to:
  • Roll back a transaction.
  • Free records held by a transaction.
Reminder: A transaction is used to make sure that the updates performed on one or more data files have successfully completed. If an error occurs in a transaction (power outage, for example), WDOptimizer automatically restores the files to the state they were at the beginning of the transaction.
Remark: WDTrans can also be used to roll back a transaction and/or free records held by a transaction.
Canceling file changes made in a transaction
When the operations performed on a transaction file are rolled back:
  • If a transaction is in progress, WDOptimizer rolls back all modifications made in the transaction and restores the data to the state it was at the beginning of the transaction. In this case, the transaction is canceled without interrupting the program execution.
  • If no transaction is in progress, WDOptimizer restores the integrity of the database and rolls back the transactions that have not been successfully completed (if a power outage occurs, for example).

Canceling file changes made in a transaction

To cancel the file changes made in a transaction:
  1. Start WDOptimizer.
  2. Select "Roll back a transaction..." then "Cancel file changes made in a transaction".
  3. Select the transaction file. The list of data files (with their full path) in the transaction is displayed. For each file, the ID of the computer that performs an operation in a transaction is displayed.
  4. If some data files are password protected, specify the password. This password is required to roll back the transaction.
  5. Click the "Roll back transaction" button. The transaction is rolled back.
Freeing records held by a transaction
Freeing the records held by a transaction restores these records to a normal state (if they are not held by another transaction in progress). If a record in the specified data file is considered to be in a transaction, but does not belong to any current transaction, it is automatically freed.
Caution: This is an advanced feature. Use this feature when it is not possible to roll back incomplete transactions (e.g. files deleted from a transaction).

Freeing records held by a transaction

To free the records held by a transaction:
  1. Start WDOptimizer:
    • From WINDEV, WEBDEV or WINDEV Mobile directly: on the "Tools" tab, in the "Database" group, click "WDOptimizer".
    • run "WDOptimizer.EXE" directly.
  2. Select "Roll back a transaction" then "Free all records held by a transaction".
  3. Select the directory containing the data files in the current transaction.
    Caution: No file held by the transaction must be in this directory. The list of data files in the directory is displayed.
    Remark: Check "Include files from all subdirectories" if data files are located in the subdirectories.
  4. If some data files are password protected, specify the password. This password is required to free the records held by the transaction.
  5. Click the "Free all records held by a transaction" button. The records are freed.
Minimum version required
  • Version 9
Comments
Click [Add] to post a comment

Last update: 07/10/2024

Send a report | Local help