Hi Not sure if I should be posting to the DBI list really, but I will try this one too.
I'm running suse linux enterprise server 8.2, MySQL 4.0.15-standard-log, DBI 1.32 I get the following error message: DBD::mysql::db rollback failed: ROLLBACK failed at dbirollbacktest.cgi line 49 DBD::mysql::db rollback failed: ROLLBACK failed at dbirollbacktest.cgi line 49 My script looks like this: my $dbh = DBI->connect("DBI:mysql:test:localhost", ... ); $dbh->{AutoCommit} = 0; $dbh->{RaiseError} = 1; eval { # the first SQL statement should be OK my $sql = "insert into testac(object_id, object_title) values (22,'michael')"; $dbh->do($sql); # the second SQL statement should fail my $sql = "insert into testac(object_id, object_title) values ('\'string',22)"; $dbh->do($sql); # if get to here, commit $dbh->commit(); }; if ($@) { print "One of the SQL statements failed\n"; $dbh->rollback(); } $dbh->disconnect; Does anyone know why my rollback won't work? Thanks Mick -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]