Welcome to Comunidade Bloggers |create|it| Sign in | Join | Help

Raúl Ribeiro

Windows SharePoint Services 3.0 , .net, Microsoft Office SharePoint 2007, Office 2007 and 2010

News

SPSiteDataQuery - Query cannot be completed because the number of lists in the query exceeded the allowable limit

What to do when you try to execute a SPSiteDataQuery and sharepoint returns this error message: "The query cannot be completed because the number of lists in the query exceeded the allowable limit".

You should, 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.

You can also use the MaxListLimit on the SPSiteDataQuery.Lists like this <Lists BaseType='850' MaxListLimit='0'/>. This will search all lists in the entire site.

Not specifying a MaxListLimit would only search 1000 lists, but throw an error if there are more than 1000 lists. If you are no sure that the client will have less than 1000 lists I recommend you to use the '0'.

Posted: Friday, August 22, 2008 9:38 AM by admin
Filed under:

Comments

No Comments

Anonymous comments are disabled