Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 11.3   11.4   11.5   12.0   12.1   12.2   12.3   12.4   12.5   13.0    Statistic    FMM    Blog  

MongoDB.AbortTransaction

Abort a multi-document transaction.

Component Version macOS Windows Linux Server iOS SDK
MongoDB 12.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "MongoDB.AbortTransaction"; MongoDBRef )   More

Parameters

Parameter Description Example
MongoDBRef The reference number for the mongo connection. $MongoDB

Result

Returns OK or error.

Description

Abort a multi-document transaction.
Returns OK if the transaction was aborted. Returns an error if there are invalid arguments, such as a session with no transaction in progress. Network or server errors are ignored.

Examples

Try aborting:

# Open connection first, open database and connection
Show Custom Dialog [ "Estimate before" ; MBS( "MongoDB.EstimatedDocumentCount"; $mongo ) ]
Set Variable [ $r ; Value: MBS( "MongoDB.StartTransaction"; $Mongo) ]
#
# insert a record
Set Variable [ $r ; Value: MBS( "MongoDB.InsertOne"; $Mongo; test::Insert JSON) ]
Show Custom Dialog [ "Result" ; $r ]
#
Show Custom Dialog [ "Estimate after insert" ; MBS( "MongoDB.EstimatedDocumentCount"; $mongo ) ]
Set Variable [ $r ; Value: MBS( "MongoDB.AbortTransaction"; $Mongo) ]
#
Show Custom Dialog [ "Estimate after abort" ; MBS( "MongoDB.EstimatedDocumentCount"; $mongo ) ]

See also

Release notes

Example Databases

Blog Entries

Created 23th September 2022, last changed 24th September 2022


Modbus.CalculateRTUMessageCRC - MongoDB.BSONtoJSON

Feedback: Report problem or ask question.


Start Chat