On 01/10/13 09:03, Alan Gauld wrote:

BTW. I notice you are using an implicit cursor within the with block.
Now while that may work, my personal preference is for explicit
variables, ...

Actually I'm not sure how it is working. I've just read the docs again and it seems to me that your code should be referencing 'con' not 'cur'.
That may be part of the problem...

>>        con = sqlite3.connect(DataBase)
>>        with con:
>>            cur.execute("""INSERT INTO %s VALUES
>>            (NULL, '%s', '%s', '%s', '%s', '%s', '%s');""" % \
>>            (Table, self.first, self.last, self.partner,
>>            self.address, self.phone, self.email, )      )

HTH
--
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