On Sun, Feb 09 2014,Peter Otten wrote: > Sivaram Neelakantan wrote: >
[snipped 32 lines] > > If nobody here comes up with a good way to find the offending record you > could ask in a mailing list/newsgroup dedicated to sqlite (Please report > back here if you do). If there is no "official" way you might try the > workaround shown below. > > The idea here is to wrap the iterable of records to be inserted in the Iter > class which keeps track of the last accessed row. > [snipped 62 lines] Thanks for the code, appreciate the help. > While this approach seems to work at the moment it will of course break > should sqlite decide one day to read records ahead before performing the > integrity test. Therefore I recommend the more conservative road to loop > over the records explicitly: > > for row in records: > try: > cursor.execute(sql, row) > except ... > ... Right, i'll go with this then [snipped 7 lines] sivaram -- _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor