SPSiteDataQuery does not return all results

Hi all,

I have created a visual web part to show all items with a specific Content Type using SPSiteDataQuery. It worked perfectly until I migrated data to my lists. Now my lists contain about 1000 items which all have same content type. I used PowerShell to migrate data to the lists. I tested during migration the web part showed the items when they were around 600 items but now after number of items come up to 900 it stopped retrieving all items. I have debugged SPSiteDataQuery retrieves only 9 results.

Any idea why SPSiteDataQuery does not retrieve all items? I appreciate all kind of advice.

June 17th, 2015 9:04am

Hi,

Please try to use ContentTypeID to filter your data, the following two blogs for your reference:

SPSiteDataQuery not returning all results when using ContentType filter

http://sharepoint2010funfacts.blogspot.com/2012/01/spsitedataquery-not-returning-all.html

[FIXED] Sometimes no results using the SPSiteDataQuery class

http://www.dotnetquest.com/post/2013/10/30/FIXED-Sometimes-no-results-using-SPSiteDataQuery

Best Regards,

Dennis

Free Windows Admin Tool Kit Click here and download it now
June 17th, 2015 9:47pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics