SQLite

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


Thanks!
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?

Matthias



More information about the Python-list mailing list