logo       

Re: executescript does not end the transaction: msg#00054

python.db.pysqlite.user

Subject: Re: executescript does not end the transaction

On error executescript do not commit nor rollback. I think it is
related to the last line of section 5 in usage guide:

"Instead, catch the IntegrityError and call the rollback method of the
connection yourself."

Am I right with this?
When I catch the exception I now call con.execute("ROLLBACK;") and it
seems to work as I intend, but a con.rollback() won't rollback! What
is the difference between the rollback method and executing a ROLLBACK
statement?

On 5/10/06, Ed Pasma <ed.pasma-39ZsbGIQGT7z+pZb47iToQ@xxxxxxxxxxxxxxxx> wrote:
>
> Hello, perhaps I'm misunderstanding. But may be you can connect to
> the database with isolation_level=None. So you can use begin and
> commit. Or does executescript commit regardless of that? Regards,
> Edzard Pasma.



--
Julien


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise