On a related note, is there a need/desire
for a std. readonly connection attribute to determine if the connection is currently in a transaction ?
E.g.,
$dbh->commit() if $dbh->{InTransaction};
I've hacked my own version of this in DBD::Teradata for an IDE I've built. Granted, its possible for the app to keep track of xaction state, but given variations in xaction behavior between various DBMS's, it might be useful for portablility, e.g.,
$dbh->{AutoCommit} = 0; ...do some SQL... ...an error occurs... $dbh->rollback() if $dbh->{InTransaction};
Since ANSI usually requires transactions to persist even when errors occur, but some DBMS's will rollback on an error, might this useful ?
DBD::Informix has supported $dbh->{ix_InTransaction} since forever (or 1996, which is close enough to forever for the difference not to matter:-)
I'd say yes, in other words.
--
Jonathan Leffler ([EMAIL PROTECTED], [EMAIL PROTECTED]) #include <disclaimer.h>
Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/