SQLSelect.Rollback Method (Typed) | |
Undo the changes (updates and deletes) made since the last Commit().
Namespace:
XSharp.VO.SDK
Assembly:
XSharp.VOSQLClasses (in XSharp.VOSQLClasses.dll) Version: 2.21
Syntax VIRTUAL METHOD Rollback() AS LOGIC
public override bool Rollback()
Request Example
View SourceReturn Value
Type:
Logic
TRUE if successful; otherwise, FALSE. Rollback() can fail for many reasons, from a lack of capability in the server to lock conflicts to technical problems such as network crashes. Use the SQLSelect:Status property to determine the exact cause of the failure.
Remarks
Some servers lack support for this operation. If the server does support it, the exact implications of a rollback vary with the server — with some database management systems, the method rolls back all servers using the same connection; with others, it rolls back only this server. In addition, some SQL servers have other implications of a rollback operation (they can close cursors, for example). This is an area that is that is not standardized in SQL; you should carefully study the documentation for your database management system.
The AutoCommit option may interfere with manual commits. You may want to turn AutoCommit off, for example:
1oSelect:Connection:SetConnectOption(SQL_AUTOCOMMIT, 0)
See Also