Matthias Huening mhuening at zedat.fu-berlin.de
Fri Oct 3 22:00:25 CEST 2008

cursor.rowcount does exactly what I need.

> Before going any further... make sure that SQLite's count_change is 
> enabled:
> PRAGMA count_changes
> PRAGMA count_changes = 0 | 1
> "Query or change the count-changes flag. Normally, when the 
> count-changes flag is not set, INSERT, UPDATE and DELETE statements 
> return no data. When count-changes is set, each of these commands 
> returns a single row of data consisting of one integer value - the 
> number of rows inserted, modified or deleted by the command. "

Looks like this is not really necessary. My database hat count_changes 
disabled, but rowcount seems to work anyway. Are there any pitfalls?


More information about the Python-list mailing list