Re: [CDBI] class::dbi::loader and transaction
"James. L" <perlwle-/[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.class-dbi |
|---|---|
| Message-ID | <[email protected]> |
thanks for enlighten me. it works now. James. --- Perrin Harkins <[email protected]> wrote: > James. L wrote: > > in do_transaction, i can > > only pass a particular table class but it won't > roll > > back the changes on other tables when failed. > > No, transactions are at the database level. A > rollback affects all work > done since the last commit. It has nothing to do > with your classes. > > > I guess that i need a base class like Music::DBI > or > > something? > > Not really. You don't need that "do_transaction" > sub at all. All you > have to do is turn off AutoCommit and call > dbi_commit() or > dbi_rollback(). If you want to use it though, it > probably is best in a > base class. > > - Perrin > ____________________________________________________________________________________ Sponsored Link Rates near 39yr lows. $510,000 Loan for $1698/mo. Calcuate new payment. www.LowerMyBills.com/lre