Transaction isolation
Pawel Lewicki <lewicki-0xdmosgkavurDJvtcaxF/[email protected]>
| Newsgroups | gmane.comp.python.db.pysqlite.user |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I tried to find information about my problem but no clear solution so far.
What should I do to keep transactions isolated?
I have a script like one copied from post from February:
>>> from pysqlite2 import dbapi2 as sqlite
>>> con = C=sqlite.connect("/path")
>>> C = con.cursor()
>>> C.execute("begin")
>>> C.execute("delete from t;")
>>> C.executemany("insert into t values(?);", (1,2,3))
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
OperationalError: SQL logic error or missing database
>>>
When I give up "C.execute("begin")" everything is fine except for
transaction isolation.
I have another concurrent connection (ODBC) and it reads empty set if I
query table between DELETE and INSERT from previous connection.
What should I do?
Pawel Lewicki