Re: db.commit()
Timothy Smith <timothy-/[email protected]> Mon, 22 Nov 2004 19:06:38 +1000
| Newsgroups | gmane.comp.python.db.pypgsql.user |
|---|---|
| Message-ID | <[email protected]> |
.rollback(), can i rollback the the last commit for the db object? Gerhard Haering wrote: >On Mon, Nov 22, 2004 at 01:03:04PM +1000, Timothy Smith wrote: > > >>can anyone point me to some docs or explainf .commit() for me. what i'm >>intrested in is what happens if i perform some actions, but say i find >>an error and do not want to commit those. if i do db.close() are thos >>updates/inserts cancled? >> >> > >To discard the changes, use .rollback() on the connection object. > >Btw. a .close() does an implicit .rollback(). > >-- Gerhard > > ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/