TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Rajkiran Swain
29
40.7k
3.4m
How to Increase the Performance of a List in Sharepoint ?
Jun 26 2015 8:30 AM
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 = "<Where><Contains><FieldRef Name='Client'/>" +
"<Value Type='Text'>" + txtClient.Text.Trim() + "</Value></Contains></Where>";
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 ?
Reply
Answers (
9
)
Sharepoint : Show list data from top level site in d subSite
Send Email by current user in SharePoint Online by C# code