(with apologies for no message threading - my message was accepted but
my list membership is still pending, I guess - should I have received
an address-confirmation email, or am I awaiting an admin's sign-off on
my list membership?)
> You should close the cursor after executing PRAGMA table_info('foo'). You
> cannot modify database schema
> while there are still outstanding statements (on the same or other
> connections).
Hmm, that suggestion doesn't change the outcome:
conn1 = sqlite3.connect("/tmp/my.db")
curs1 = conn1.cursor()
print "1: pragma"
curs1.execute("PRAGMA table_info('foo')")
print "1: close"
curs1.close()
conn2 = sqlite3.connect("/tmp/my.db")
curs2 = conn2.cursor()
print "2: create"
curs2.execute("CREATE TABLE foo ( a integer )")
conn2.commit()
conn2.close()
print "1: select (new cursor)"
curs1 = conn1.cursor()
curs1.execute("SELECT * from foo")
sqlite.py: 2.3.2
sqlite itself: 3.3.6
1: pragma
1: close
2: create
1: select (new cursor)
Traceback (most recent call last):
File "simp.py", line 29, in <module>
combined()
File "simp.py", line 27, in combined
curs1.execute("SELECT * from foo")
sqlite3.OperationalError: no such table: foo
Dustin
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users