|
|
|
|
|
- Handling records during a transaction
- Transactions and independent HFSQL context
HTransactionInterrupted (Function) In french: HTransactionInterrompue
Available only with these kinds of connection
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: - start WDTRANS or WDOptimizer.
- start the HFSQL Control Center.
- cancel the transaction through programming.
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.TrsApplicationName | Value if the transaction was interrupted: Application name in the following format: Executable Name(Project Name). Value if the transaction was not interrupted: Empty string (""). Remark: This variable is available in HFSQL Client/Server mode only. | H.TrsInternalID | Value if the transaction was interrupted: Internal number used to identify the transaction. Value if the transaction was not interrupted: -1 | H.TrsMachineName | Value if the transaction was interrupted: Name and IP address of client computer. Value if the transaction was not interrupted: Empty string (""). Remark: This variable is available in HFSQL Client/Server mode only. | H.TrsPost | Value if the transaction was interrupted: Identifier defined by HComputer or name of the computer from which the transaction was started. Value if the transaction was 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 if it is not specified, the transaction file used is the default transaction file (in the directory of the application named: <Project Name>_$TRS_OPERATION.trs).
Remarks Handling 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
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|