0

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?

Nat
  • 14,175
  • 5
  • 41
  • 64

2 Answers2

1

Because SharePoint is intent on making development painful ;)

Paul Lalonde
  • 5,020
  • 2
  • 32
  • 35
1

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.

Alex Angas
  • 59,219
  • 41
  • 137
  • 210