PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

New WINDEV, WEBDEV and WINDEV Mobile 27 feature!
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
Rolls the transaction back to the savepoint.
Example
MyConnection is Connection
 
// Start transactions
HTransactionStart(MyConnection)
 
// Actions A
 
// Declare a savepoint
HTransactionSavepoint(MyConnection, "MySavepoint")
 
// Actions B
 
// Undo all actions after the declaration of MySavepoint
HTransactionRollbackToSavepoint(MyConnection, "MySavepoint")
 
// Actions C
 
// Declare a savepoint
HTransactionSavepoint(MyConnection, "MySavepoint2")
 
// Actions D
 
// Validate (commit) transactions
// Actions A, C and D are taken into account,
// but not B actions because they are between HTransactionSavepoint()
// and HTransactionRollbackToSavepoint
 
HTransactionEnd(MyConnection)
 
// MySavepoint2 is disabled
Syntax
<Result> = HTransactionRollbackToSavepoint([<Connection>, ] <Savepoint name>)
<Result>: Boolean
  • True if rolled back successfully,
  • False if a problem occurred. HErrorInfo returns more details about the error.
<Connection>: Character string or Connection variable
Connection to an HFSQL server. This connection corresponds to: If this parameter is not specified, the current connection is used.
<Savepoint name>: Character string
Name of the savepoint to which the transaction is to be rolled back. If the savepoint does not exist, an error is returned.
Remarks
  • This function must be used in a transaction.
  • The corresponding SQL statement can also be used: "ROLLBACK TO SAVEPOINT identifiant".
  • This function is not available:
    • on HFSQL files in cluster mode,
    • with files handled via a Native Connector.
Business / UI classification: Business Logic
Component: wd270hf.dll
Minimum version required
  • Version 27
This page is also available for…
Comments
Click [Add] to post a comment