Question

I am calling SPWeb.GetSiteData(anSpCrossListQuery).

It fails to bring back any results or any errors when I call it with an accidental space at the end of the CAML query <Where></Where> clause.

Anyone have an idea why?

Was it helpful?

Solution

SharePoint is very picky with CAML queries and gives very unhelpful and sometimes obscure errors. Obviously in this case, a simple String.Trim() will fix the problem.

Checking your query very carefully and making sure it is well formed has fixed every problem I've had with this.

OTHER TIPS

Because SharePoint is intent on making development painful ;)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top