Re: Transactions: DBI vs. SQL



Tom Mornini wrote:
You need to turn AutoCommit off with:

my $dbh = DBI->connect('dbi:Pg:dbname=test', 'postgres', '...',
{ PrintError => 1, RaiseError => 0, AutoCommit => 0 });



You should not have to turn autocommit off with begin_work:

From the docs:

"Enable transactions (by turning AutoCommit off) until the next call to commit or rollback. After the next commit or rollback, AutoCommit will automatically be turned on again."

I certainly do not turn autocommit off with DBD::ODBC and dbd::mysql
and it works as I'd expect.

Martin
.



Relevant Pages

  • Re: Transactions: DBI vs. SQL
    ... I am able to enact transaction processing in sybase with the DBI/DBD::Sybase combination with autocommit set to on. ... "Enable transactions (by turning AutoCommit off) until the next call to commit or rollback. ...
    (perl.dbi.users)
  • Re: transaction demarction
    ... do they mark something? ... a banking transaction that moves money from one bank account ... that involves database access and ends when you either COMMIT or ROLLBACK. ...
    (comp.lang.java.programmer)
  • Re: transaction demarction
    ... a banking transaction that moves money from one bank account ... a "demarcation" between the two units of work. ... that involves database access and ends when you either COMMIT or ROLLBACK. ...
    (comp.lang.java.programmer)
  • Re: transaction demarction
    ... do they mark something? ... a "demarcation" between the two units of work. ... the COMMIT or ROLLBACK statement marks the end of the unit of work so ...
    (comp.lang.java.programmer)
  • Hein is in the house :-) (was Re: Recommended HP COBOL way to exit a paragraph or perform early?
    ... commit or rollback. ... Committed but RMS just keeps getting better and better so is Repeatable Read ... node) the RMS Exec Mode Rundown handler will Rollback any outstanding ... transactions that a process may have if/when that particular process gets ...
    (comp.os.vms)