Commit - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

Connection

  

Commit

  

commit the current transaction

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

connection:-Commit( )

Parameters

connection

-

Connection module

Description

• 

Commit closes the current transaction and applies all the changes to the database.  After Commit has been called, a new transaction is in effect.

• 

The current transaction can be canceled by calling Rollback.

• 

Depending on the transaction isolation of the current Connection, updates made within a transaction may not be visible to other processes accessing the database until the changes are committed.  For more information about transaction isolation, see SetOptions.

Examples

Execute an update.

driverDatabaseLoadDriver:

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

At this point the new row is not in the database.  If you were to exit Maple the row would be discarded.  The update must be committed before it enters the database.

conn:-Commit

Now that Commit has been executed, the new row has been added to the database.

See Also

Database

Database[Connection]

Database[Connection][CreatePreparedStatement]

Database[Connection][CreateStatement]

Database[Connection][ExecuteUpdate]

Database[Connection][Rollback]

Database[Statement]

Database[usage]

 


Download Help Document