Hi,
I am trying to find files in a document library using the following code but it isn't working. These files are contained in folders. However the query returns no data. Even ran the query in U2U query builder but no luck. Can someone tell me what I am doing wrong?
SPList oList = properties.Web.Lists["Client Bills"];
SPQuery spQuery = new SPQuery();
spQuery.Query = string.Concat("<Where>",
"<IsNotNull>",
"<FieldRef
Name='Completed' />",
"</IsNotNull>",
"</Where>");
SPListItemCollection spListItemCollection = oList.GetItems(spQuery);
foreach(SPListItem oItem in spListItemCollection)
{
oItem.Delete();
}
Sherazad