Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
I’ve just spend an hour trying to find the source why SPQuery returns all items of a list and ignors where clause
My code was like this:
SPQuery query = new SPQuery();
query.Query = "<Query><Where>---------</Where></Query>"
SPListItemCollection ListOneResults = ListOne.GetItems(query);
Sol'n: Just delete '<Query>' and '</Query>' tags from your query.Query.
I’d also like to thank U2U for their CAML Query Builder, which helps in writing the CAML queries.