Re: Stupid Oracle question

2010-05-06 Thread Martin J. Evans
Bruce Johnson wrote: > > On May 6, 2010, at 11:34 AM, John Scoles wrote: > >> Bruce Johnson wrote: >> >> Depends if you have |AutoCommit| on or not and if you DB and DBD >> friver can do a rollback. > > > I've explicitly turned autocommit off, so I can roll back transactions > if an error occur

Re: Stupid Oracle question

2010-05-06 Thread Martin J. Evans
Bruce Johnson wrote: > If $dbh is my database handle, to roll back the current transaction I > do: $dbh->rollback(); right? > > The DBD::Oracle docs don't explicitly say > > You want to look at the DBI pod. The begin_work method starts a txn and the commit and rollback methods commit or rol

RE: Stupid Oracle question

2010-05-06 Thread Martin Gainty
that should work.. here is a snippet from DBD-Oracle-1.24\Oracle.ex\commit.pl which creates the connection handle and then rolls back with it # Connect to database my $dbh = DBI->connect( "dbi:Oracle:$inst", $user, $pass, { AutoCommit => 0, RaiseError => 1, PrintError => 0 } ) or di

Re: Stupid Oracle question

2010-05-06 Thread Bruce Johnson
On May 6, 2010, at 11:34 AM, John Scoles wrote: Bruce Johnson wrote: Depends if you have |AutoCommit| on or not and if you DB and DBD friver can do a rollback. I've explicitly turned autocommit off, so I can roll back transactions if an error occurs. In the old Oraperl syntax it's: i

Re: Stupid Oracle question

2010-05-06 Thread Michael Nhan
Hi, Yes. Its in the DBI docs. Michael On Thu, 6 May 2010, Bruce Johnson wrote: Date: Thu, 6 May 2010 11:30:59 -0700 From: Bruce Johnson To: DBI Users Mailing List Subject: Stupid Oracle question If $dbh is my database handle, to roll back the current transaction I do: $dbh->rollback(); r

Re: Stupid Oracle question

2010-05-06 Thread John Scoles
Bruce Johnson wrote: Depends if you have |AutoCommit| on or not and if you DB and DBD friver can do a rollback. cheers John Scoles If $dbh is my database handle, to roll back the current transaction I do: $dbh->rollback(); right? The DBD::Oracle docs don't explicitly say