SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know about this post on BCS paging: Paging and sorting with BCS and have implemented a similar approach in a BCS solution. However, what I'm really looking for is a complete example showing how to use the batching and batching termination filter descriptors in a BCS .NET Connectivity solution. The MSDN post: is incomplete. If anyone knows of a source (blog, article, book, chm, post-it note) that demonstrates exactly how to use these batching filter descriptors, please let me know where to find it.


share|improve this question

You can try this:

<Method Name="GetItems" LobName="GetItems" IsStatic="false">
            <FilterDescriptor Name="BatchingStateCookie" Type="Batching">
                <Property Name="BatchingCookie" Type="System.String">Cookie</Property>
            <FilterDescriptor Name="HasMoreBatches" Type="BatchingTermination">
                <Property Name="CaseSensitive" Type="System.Boolean">false</Property>
                <Property Name="Comparator" Type="System.String">!=</Property>
                <Property Name="TerminationValue" Type="System.String">true</Property>
            <Parameter Name="cookie" Direction="InOut">
              <TypeDescriptor Name="cookieTypeDescriptor" TypeName="System.String" AssociatedFilter="BatchingStateCookie"/>
            <Parameter Name="hasmore" Direction="Out">
              <TypeDescriptor Name="hasmoreTypeDescriptor" TypeName="System.String" AssociatedFilter="HasMoreBatches"/>

and in .NET:

int batch_size = 1000;
public MyItem[] GetItems(ref string cookie, out string hasmore)

    if (cookie == null) {
        // we are in first batch
        // do some initialization if needed
    MyItem[] items = new MyItem[batch_size];
    hasmore =  GetItemsFromDatabase(cookie, items) > 0 ? "true" : "false";
    cookie = items[0].Id; // or something else you need to determine what to bring in the next batch
    return items;
share|improve this answer
Have you gotten this to work in BCS .NET Connectivity solution? I tried this code and the entity was no longer available when creating an external list. Inspecting the log revealed the following error message (Level: Medium - go figure!) "VLPROV: Finder 'ReadList' has a filter of type 'Batching'. These filters are not supported for external lists. Creating no view for this finder. ... ValidateDefaultFindSpecificWithFinderExistence failed for entity: Entity1" – Tom Nov 16 '11 at 10:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.