foreach (SPListItem listItem in collListItems)
var result = db.sp_MOSSCloseCase(Convert.ToInt32(listItem["Case Number"]));
if (result == listItem["Case Number"])
Obviously I can't delete items in a collection within a Foreach loop. Problem is that the stored procedure is to return the case number in the DB only if there is a completed date(case being closed). So i thought if (result != null) then move the result
to a List or something. Then go through the list and delete items where results = item["Case Number"] but result is never null... nor does it ever == listItem["Case Number"]
For the life of me, I cannot figure out how to get the result values into a list and then delete them from the SPList.
View Complete Post