On 18/09/13 18:13, Timo wrote:

You are trying to execute on the database rather
than on a cursor. You need to create a cursor
first to hold your results.

Something like;

cur = g.db.cursor()
cur.execute(.....)
Not really.

sqlite3.connect() returns a sqlite3.Connection object which has a
execute method. It will create a cursor object for you.

Interesting.
I didn't know that, I've always created a separate cursor
explicitly. But that's probably because I'm used to
Oracle which requires me to do that from C++


--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.flickr.com/photos/alangauldphotos

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to