Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

SQL.SetAutoCommit

Enables or disables autocommit for the current connection, that is, automatic commit of every SQL command.

Component Version macOS Windows Linux Server iOS SDK
SQL 2.6 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "SQL.SetAutoCommit"; Connection; AutoCommit )   More

Parameters

Parameter Description Example
Connection The connection reference number gained with SQL.NewConnection. $Connection
AutoCommit Whether to turn auto commit on or off. Can be "On" or "Off". "On"

Result

Returns "OK" or error message.

Description

Enables or disables autocommit for the current connection, that is, automatic commit of every SQL command.
If autocommit is on, the database is committed automatically after each SQL command. Otherwise, transaction is committed only after Commit calling.

Examples

Turn auto commit off:

MBS( "SQL.SetAutoCommit"; $Connection; "off" )

See also

Example Databases

Blog Entries

This function is free to use.

Created 18th August 2014, last changed 25th October 2018


SQL.ServerVersionString - SQL.SetClient