rem: this.mDeleteAttendees.step(); this.mDeleteProperties.step(); this.mDeleteItem.step(); 
add: if (olditem) { this.mDeleteAttendees.step(); this.mDeleteProperties.step(); this.mDeleteItem.step();  this.mDeleteAttendees.reset(); this.mDeleteProperties.reset(); this.mDeleteItem.reset(); } 
context:     flushItem: function (item, olditem) {        // for now, we just delete and insert        // set up params before transaction        this.mDeleteItem.params.id = item.id;        this.mDeleteItem.params.cal_id = this.mCalId;        this.mDeleteAttendees.params.item_id = item.id;        this.mDeleteProperties.params.item_id = item.id;        var ip = this.mInsertItem.params;        ip.cal_id = this.mCalId;        ip.id = item.id;        ip.time_created = item.creationDate.jsDate;        ip.last_modified = item.lastModifiedTime.jsDate;        ip.title = item.title;        ip.priority = item.priority;        ip.privacy = (item.isPrivate ? 1 : 0);        ip.ical_method = item.method;        ip.ical_status = item.status;        var flags = 0;        if (item instanceof kCalIEvent) {            ip.item_type = CAL_ITEM_TYPE_EVENT;            if (item.isAllDay)                flags |= CAL_ITEM_FLAG_EVENT_ALLDAY;            ip.event_start = item.startDate.jsDate;            ip.event_end = item.endDate.jsDate;            ip.event_stamp = item.stampDate.jsDate;        } else if (item instanceof kCalITodo) {            ip.item_type = CAL_ITEM_TYPE_TODO;            ip.todo_entry = item.entryTime.jsDate;            ip.todo_due = item.dueDate.jsDate;            ip.todo_completed = item.completedDate.jsDate;            ip.todo_complete = item.percentComplete;        } else {            // XXX fixme error            throw Components.results.NS_ERROR_FAILURE;        }        // start the transaction        this.mDB.beginTransaction();        try {            this.mDeleteAttendees.step();            this.mDeleteProperties.step();            this.mDeleteItem.step();            var attendees = item.getAttendees({});            if (attendees && attendees.length > 0) {                flags |= CAL_ITEM_FLAG_HAS_ATTENDEES;                for (var i = 0; i < attendees.length; i++) {                    var a = attendees[i];                    var ap = this.mInsertAttendee.params;                    ap.item_id = item.id;                    ap.attendee_id = a.id;                    ap.common_name = a.commonName;                    ap.rsvp = a.rsvp;                    ap.role = a.role;                    ap.status = a.status;                    ap.type = a.type;                    this.mInsertAttendee.step();                }            }            ip.flags = flags;            this.mInsertItem.step();            this.mDB.commitTransaction();        } catch (e) {            dump ("EXCEPTION; error is: " + this.mDB.lastErrorString + "\n");            dump (e);            this.mDB.rollbackTransaction();        }        this.mItemCache[item.id] = item;    },
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/0d1bc5752b932d237d44ede42cb6912127b33e0a/calStorageCalendar.js/clean/calendar/providers/storage/calStorageCalendar.js