SQLite

Matthias Huening mhuening at zedat.fu-berlin.de
Fri Oct 3 14:33:02 CEST 2008


Hi,

This is probably trivial, but I cannot find a solution right now.
With MySQLdb, I could test the success of a deleting action like this:

sql = "DELETE FROM table WHERE name='xxx'"
res = cur.execute(sql)
if res == 1:
      print 'Okay'
else:
      print 'nothing deleted'


This seems not to work with sqlite3. How can I test whether deletion was 
sussessful or not?

Thanks,
Matthias



More information about the Python-list mailing list