Re: [pysqlite] [3.6.3-r1] Row not updated?
Fred <[email protected]> Thu, 20 Nov 2008 20:11:04 +0100
| Newsgroups | gmane.comp.python.db.pysqlite.user |
|---|---|
| Message-ID | <[email protected]> |
Gerhard Häring > There's no BEGIN ... END in SQL. Thanks. The reason I used BEGIN/END is because of this message: http://itsystementwicklung.de/pipermail/list-pysqlite/2008-November/000201.html But switching to this makes no difference: ====== try: sql = "UPDATE ape SET nombre=0 WHERE code='%s'" % ape print sql #Error: UPDATE ape SET nombre=0 WHERE code='0112Z' cursor.execute(sql) connection.commit() break except: print "Error: " + sql connection.close(True) sys.exit() ====== I'm re-reading the documentation, but there's no indication that there's the need for commiting changes which would explain why the UPDATE statement isn't actually committed: http://apsw.googlecode.com/svn/publish/cursor.html By any chance, does someone have an example of an embeddded SELECT + UPDATE/INSERT loop that works, so I could take a look? Thank you.