On December 31, 2004 06:37 am, D. Richard Hipp wrote: > Thomas Fjellstrom wrote: > > It is possible for result items to sit around un finalized for a period, > > would that cause sqlite to keep a table locked? > > In version 3.0.5 and earlier, the commit did not occur until you > ran sqlite3_finalize(). Beginning with version 3.0.6, the commit > occurs on the last call to sqlite3_step() - the one that returns > SQLITE_DONE. > > Even in version 3.0.8, if you have a query running on a table > that has not yet returned SQLITE_DONE, then you are prohibited > from making changes to that table.
So something as simple as: (riped out of delete_key()) MadSQLiteResult *res = conf->db->preparef("SELECT id FROM conf_key WHERE parent_id=%i;", kid); if(!res) return false; while(res->step() == MadDB_ROW) { if(!delete_key(res->columnInt(0))) return false; } delete res; conf->db->queryf("DELETE FROM conf_key WHERE id=%i", kid); will fail? :( Thanks, and sorry for the half written duplicate :( -- Thomas Fjellstrom [EMAIL PROTECTED] http://strangesoft.net