ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / Managing databases / HFSQL / Managing transactions / WLanguage functions
  • Handling records during a transaction
  • Transactions and independent HFSQL context
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Allows you to find out whether a transaction was interrupted (the transaction was neither validated nor canceled). The characteristics of the interrupted transaction are returned by the HFSQL variables.
We advise you to call this function in the project initialization code. If the transaction is interrupted, you can:
  • HFSQL Classic start WDTRANS or WDOptimizer.
  • HFSQL Client/Server start the HFSQL Control Center.
  • cancel the transaction programmatically.
HFSQL Client/Server This function is useful when transactions have been interrupted on password-protected data files.
Example
IF HTransactionInterrupted("") = True THEN
	HTransactionCancel()
END
Syntax
<Result> = HTransactionInterrupted([<Transaction file>])
<Result>: Boolean
  • True if a transaction was interrupted,
  • False if no transaction was interrupted. The following HFSQL variables are updated:
    H.TrsApplicationNameValue if transaction interrupted: Application name in the form: Executable name(Project name).
    Value if transaction not interrupted: Empty string ("").
    Note This variable is only available in HFSQL Client/Server mode.
    H.TrsInternalIDValue if the transaction has been interrupted: Internal number uniquely identifying the transaction.
    Value if transaction not interrupted: -1
    H.TrsMachineNameValue if the transaction was interrupted: Client workstation name and workstation IP address.
    Value if transaction not interrupted: Empty string ("").
    Note This variable is only available in HFSQL Client/Server mode.
    H.TrsPostValue if the transaction was interrupted: Identifier defined by the HComputer function or name of the machine from which the transaction was initiated.
    Value if transaction not interrupted: Empty string ("")
<Transaction file>: Optional character string
Full name of the transaction file (used to store the operations performed within the transaction). This file is automatically destroyed when HTransactionEnd or HTransactionCancel is used.
If this name corresponds to an empty string ("") or is not specified, the transaction file used is the default transaction file (in the application directory with the name: <Nom Projet>_$TRS_OPERATION.trs)..
HFSQL Client/Server This parameter is ignored by the Client/Server transactions, it is only taken into account by the HFSQL Classic transactions.
Remarks

Handling records during a transaction

During a transaction, some rules must be complied with when handling the records. For more details, see Transactions: Handling the records during a transaction.

Transactions and independent HFSQL context

When copying a context, if a transaction is in progress on the first context, the new context is not in transaction. You must call HTransactionStart (or HTransaction) to start a transaction in the new context.
Business / UI classification: Business Logic
Component: wd300hf.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/28/2025

Send a report | Local help