我想使用 SPQueryThrottleOption 覆盖 QueryThrottle 设置。这将在客户端对象模型中完成。
SPQuery q = new SPQuery();
q.QueryThrottleMode = SPQueryThrottleOption.Override;
可以在 Client Object Model-Sharepoint 2013 中完成吗?
我想使用 SPQueryThrottleOption 覆盖 QueryThrottle 设置。这将在客户端对象模型中完成。
SPQuery q = new SPQuery();
q.QueryThrottleMode = SPQueryThrottleOption.Override;
可以在 Client Object Model-Sharepoint 2013 中完成吗?
Please try this:
SPWeb web = SPContext.Current.Web;
SPList list = web.Lists["BigList"];
SPQuery query = new SPQuery();
query.QueryThrottleMode = SPQueryThrottleOption.Override;
SPListItemCollection items = list.GetItems(query);
litMessage.Text = String.Format("This list contains {0} items", items.Count);
The important bit is the 4th line down:
query.QueryThrottleMode = SPQueryThrottleOption.Override;
The SPQueryThrottleOption enumeration has three values: Default, Override, and Strict. If you use the default value, the standard list view threshold applies to all users except local server administrators, who are not bound by either threshold. If you set the query throttle mode to Override, users who have the required permissions in the Web application user policy can query at the higher "auditors and administrators" threshold. Local server administrators remain unbound by either threshold. Finally, if you set the query throttle mode to Strict, this closes down the local server administrator loophole and the standard list view threshold applies to all users.