Forcing a Commit
The DBI defines a method called
commit()
for explicitly committing any uncommitted
data within the current transaction. This method is executed against
a valid database handle:
$dbh->commit();
If commit()
is invoked while
AutoCommit
is enabled, a warning will be displayed
similar to:
commit ineffective with AutoCommit
which merely tells you that the database changes have already been
committed. This warning will also be displayed when
commit()
is invoked against a database that has no
transaction support because, by definition,
AutoCommit
will be enabled.
Get Programming the Perl DBI now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.