Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

CAML query on SharePoint list not working after reaching threshold limit

$
0
0

I have written CAML query to filter and get list items. It was working fine, but the List items count crossed 5000 and its around 15000 items. In Server Object Model When i execute my query to get list items throws exception as " The attempted operation is prohibited because it exceeds the list view threshold enforced by the administrator ".

My Code:

SPList list = web.Lists["ComplaintReturnsForm1"];
string QIRIdNo = fldQIRIdNo.Text;
SPQuery query = new SPQuery();
query.Query = "<Where><Eq><FieldRef Name='fldQIRIdNo' /><Value Type='Text'>" + QIRIdNo + "</Value></Eq></Where>";
SPListItemCollection itemcoll = list.GetItems(query);

Please help me to fix it. 




Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>