Tags

The query cannot be completed because the number of lists in the query exceeded the allowable limit. For better results, limit the scope of the query to the current site or list or use a custom column index to help reduce the number of lists

I have hit this error when using the SPSiteDataQuery, the trick is to

my SPSiteDataQuery had used MaxListsLimit where MaxListLimit should have been for the Lists property of my SPSiteDataQueryI was using

"<Lists BaseType=’1′ MaxListsLimit=’0’/>"

When what I needed was just:

"<Lists BaseType=’1′ MaxListLimit=’0’/>"

Advertisements