SET-AUTOCOMMIT
Prev | Transaction Handling | Next

## Name

SET-AUTOCOMMIT — Turn on or off autocommit for a database.Function

## Syntax

          set-autocommit value &key database => result

## Arguments and Values

`value`

  A Boolean specifying the desired autocommit behaviour for `database`.

`database`

  A database object. This will default to the value of *default-database*.

`result`

  The previous autocommit value for `database`.

## Description

Turns autocommit off for `database` if `value` is `NIL`, and otherwise turns it on. Returns the old value of autocommit flag.

For RDBMS (such as Oracle) which don't automatically commit changes, turning autocommit on has the effect of explicitly committing changes made whenever SQL statements are executed.

Autocommit is turned on by default.

## Examples

## Side Effects

`database` is associated with the specified autocommit mode.

## Affected by

None.

## Exceptional Situations

None.

## See Also

`start-transaction`
`commit`
`add-transaction-commit-hook`
`with-transaction`

## Notes

`set-autocommit` is a CLSQL extension.

Prev | Up | Next
ADD-TRANSACTION-ROLLBACK-HOOK | Home | WITH-TRANSACTION