Dear All,
Please tell me the Solution.
I have a List having more than 5000 record and When I am Going to Fetch all record from list I Have getting Error like this.
Web Part Error: Sandboxed code execution request failed. Correlation ID: 1b20149d-a096-2000-1387-e36b01d5c688.
That's why I have used
private void SearchClients()
{
try
{
using (SPSite site = new SPSite(SPContext.Current.Web.Url))
using (SPWeb sweb = site.OpenWeb())
{
SPList spList = sweb.Lists["Project Details"];
spList.EnableThrottling = true;
SPQuery oQuery = new SPQuery();
oQuery.Query = " " +
"" + txtClient.Text.Trim() + " ";
oQuery.QueryThrottleMode = SPQueryThrottleOption.Override;
oQuery.RowLimit = 3000;
SPListItemCollection coll = spList.GetItems(oQuery);
dt = coll.GetDataTable();
GridView2.DataSource = dt;
GridView2.DataBind();
}
}
catch (Exception ex)
{
lblMsg.Text = ex.Message;
}
Again I have facing some problem Means Some time it's Working Fine and Some time I have got same Error .
I don't Know why it's Coming again and again please tell me the solution .
How to Increase the Performance of this List ?

Gowtham RajamanickamRank #57 · 29K reputationPosted Aug 6, 2015, 4:22 AM EDT
Manpreet SinghRank #15 · 50.7K reputationPosted Jul 13, 2015, 8:49 AM EDT
Rajkiran SwainRank #165 · 14.4K reputationPosted Jul 13, 2015, 10:26 PM EDT
Manpreet SinghRank #15 · 50.7K reputationPosted Jul 14, 2015, 7:44 AM EDT
Rajkiran SwainRank #165 · 14.4K reputationPosted Jul 15, 2015, 2:13 AM EDT
Rajkiran SwainRank #165 · 14.4K reputationPosted Jul 15, 2015, 3:04 AM EDT
Prasham SabadraRank #116 · 19.3K reputationPosted Jul 19, 2015, 1:24 AM EDT
Manpreet SinghRank #15 · 50.7K reputationPosted Jul 23, 2015, 3:16 PM EDT
Rajkiran SwainRank #165 · 14.4K reputationPosted Jul 23, 2015, 11:37 PM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts