In <[EMAIL PROTECTED]>, Jorgen Bodde wrote: >>>> r = c.execute('select * from song where id = 1') >>>> for s in r: > ... print s > ... > (1, u'Spikedrivers Blues', u'Mississippi John Hurt') > > That works. But when I can't restore the row by e.g. an ID that does > not exist, I cannot see any method in 'r' (which is a SQLite.Cursor) > that can tell me if I have rows. As explained in the help, r.rowcount > does not give a valid result because it can't determine how many rows > are restored in advance.
This should not work because `r` should not be a `Cursor` object. The `execute()`-Method returns an integer with the number of "affected rows". Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list