in reply to Multiple Updates with SQL in one connection

You've got the answer of "if AutoCommit is turned off...". So here's how to turn AutoCommit on (which will automatically commit all inserts/updates/deletes).

$dbh = DBI->connect($data_source, $user, $pass, { AutoCommit => 1 } );
1 is on, 0 is off.

This is from Programming the Perl DBI from O'Reilly. It can also be found in perldoc DBI, or here.

UPDATE: I forgot to mention, this is considered a bad thing to do these days. But, given caution, it can be a nice feature to use on purpose. Unfortunately, the system I'm on has AutoCommit turned on by default, and that's bitten me a couple of times... :-(

MungeMeister

Replies are listed 'Best First'.
Re: Re: Multiple Updates with SQL in one connection
by mpeppler (Vicar) on Jan 24, 2002 at 04:26 UTC
    The default AutoCommit value (on) is not necessarily bad. This depends on the database system you are connecting to, and how that system handles transactions.

    AutoCommit turned on is the natural mode for Sybase and MS-SQL database servers, for example.

    Michael