According to http://www.kitebird.com/articles/ruby-dbi.html "Using the
Ruby DBI Module", the following rollback should work but doesn't:
$DBH['AutoCommit'] = false
sth = $DBH.prepare("SELECT * FROM add_user_list(?)")
sth.execute('blahblah')
$DBH.rollback
where "add_user_list" is a stored procedure that inserts a row in a
table. As a result, user "blahblah" is inserted in the table -- the
rollback didn't work.
However, this works:
$DBH.do("BEGIN")
sth = $DBH.prepare("SELECT * FROM add_user_list(?)")
sth.execute('blahblah')
$DBH.do("ROLLBACK")
and user "blahblah" does not get added to the table.
Fun. Should I report this somewhere in particular?
Thanks
···
--
Posted via http://www.ruby-forum.com/.