On Wed, 16 Oct 2002, Kirk Bowe wrote:
>  my $dbh = DBI->connect ("dbi:Pg:dbname=hello", "postgres", "foo");
>  my %orig = ();
>  my @attrs = qw(AutoCommit RaiseError);
>  $orig{$_} = $dbh->{$_} for @attrs;
>  $dbh->{AutoCommit} = 0; $dbh->{RaiseError} = 1;
>
> When I later do the $dbh->commit, it fails with this in my log file:

I've always done it this way, further the DBI man states:

           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.

Although I usually just do a $dbh->{AutoCommit}=1 to re-enable.

Are you sure that there isn't something else changing the AutoCommit back
on, unintentionally?

Rafiq
-- 
Senior Programmer
Bookings.nl
----------------------------------------------------------
Me::[EMAIL PROTECTED]||www.dreamthought.com
Budget hosting on my 10Mbit/backbone::[EMAIL PROTECTED]


Reply via email to