Partilhar via


SPChangeCollection.CountLimit Field

NOTE: This API is now obsolete.

This constant is obsolete. Use the FetchLimit property instead.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
<ObsoleteAttribute("Use SPChangeQuery.FetchLimit instead, or continue fetching until 0 changes are returned.")> _
Public Const CountLimit As Integer
'Usage
Dim value As Integer

value = SPChangeCollection.CountLimit
[ObsoleteAttribute("Use SPChangeQuery.FetchLimit instead, or continue fetching until 0 changes are returned.")]
public const int CountLimit

Remarks

The value of this constant is 1000. This is the default number of changes returned by a single call to GetChanges().

The total number of changes recorded in the change log could be very large, depending on the scope of the query. Fetching all changes in a single round trip would place an unnecessarily high demand on network and server resources. For performance reasons, changes are returned in batches of limited size with a default size of CountLimit changes.

If you want all changes recorded in the log, your code should call the GetChanges method in a loop until it returns a collection with fewer than CountLimit changes. You can use the SPChangeToken from the last change of the first batch to get the second batch, and so on until you get a batch with fewer than CountLimit changes.

See Also

Reference

SPChangeCollection Class

SPChangeCollection Members

Microsoft.SharePoint Namespace

FetchLimit

GetChanges()

Other Resources

Using the Change Log