Rollback - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Connection

  

Rollback

  

cancel the current transaction

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

connection:-Rollback( )

Parameters

connection

-

Connection module

Description

• 

Rollback cancels the current transaction and discards all the changes in the current transaction.  After Rollback has been called a new transaction is in effect.

• 

The current transaction can be committed by calling Commit.

Examples

Execute an update.

driverDatabaseLoadDriver:

conndriver:-OpenConnectionurl,name,pass:conn:-ExecuteUpdateINSERT INTO animals( id, name, number, mass ) VALUES( 11, 'chicken', 15, 2.1 ):conn:-ExecuteUpdateINSERT INTO animals( id, name, number, mass ) VALUES( 12, 'cow', 2, 513 ):

Calling Rollback cancels all the uncommitted changes.

conn:-Rollback;conn:-ExecuteQuerySELECT * FROM animals WHERE id > 10,output=Array

(1)

See Also

Database

Database[Connection]

Database[Connection][Commit]

Database[Connection][CreatePreparedStatement]

Database[Connection][CreateStatement]

Database[Connection][ExecuteUpdate]

Database[Statement]

Database[usage]