14 comments on “ADO.NET Data Services vs Client Object Model (client.svc)

  1. Great Post!

    ADO.NET Data Services ( listdata.svc)
    “You can not query more than 1000 items at a time”

    Can you please consider explaining a bit more on this limitation and any references to technet/MSDN.

    Thanks,

    • It is a ADO.NET Data Service limitation.

      and here is a reference on msdn : http://msdn.microsoft.com/en-us/library/ee358709.aspx which speak about this issue on how to deal with it.

      The things is that when you create your own ADO.NET Data Services, you can configurate some parameters but I’haven’t figured out yet how to do that in the Sharepoint context.

      it does not refer to the 1000 items exactly but just as it limits the amount of the data. I just got the 1000 number by testing.

      Hope it helps.

  2. I’ve made some more tests on WCF Data Services (evolution of ADO.NET Data Services) and on the ADO.NET Data Services (Sharepoint one)

    and I do not have the same issue. I can retreive more than 1000 items.

    Maybe they set the row max number to return on the ADO.NET Data Service of Sharepoint.

  3. Hello Maram,

    I’ve figured out the problem.

    I’ve extracted the Microsoft.SharePoint.Linq.DataService.dll from the GAC.

    and I found the initialisation of the service, here it is.

    public static void InitializeService(DataServiceConfiguration config)
    {
    if (config == null)
    {
    throw new ArgumentNullException(“config”);
    }
    config.SetEntitySetAccessRule(“*”, EntitySetRights.All);
    config.SetServiceOperationAccessRule(“*”, ServiceOperationRights.AllRead);
    config.SetEntitySetPageSize(“*”, 0x3e8);
    config.MaxBatchCount = 0x3e8;
    config.MaxChangesetCount = 100;
    config.MaxExpandCount = 7;
    config.MaxExpandDepth = 7;
    config.MaxObjectCountOnInsert = 100;
    config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2;
    }

    config.SetEntitySetPageSize(“*”, 0x3e8);

    3e8 in decimal = 1000

    and as you can see it’s hardcoded, you cannot change this limit but be aware that it’s a Page Limit!

    Hope it helps

  4. Pingback: ADO.NET Data Services returns 1000 items « Diary of a Software Developer

  5. Great stuff without any doubt.. best article I have read on these two subjects.. It’s more often come to one over another..

    In your article, I would add one more disadvantage for WCF services… Schema is generated when service WCF proxy is created. New lists or schema update requires proxy update. Just like LINQ-to-SharePoint, it is somewhat inflexible because it restricts the further schema changes on SharePoint Site.

  6. Pingback: SharePoint Client Side Techniques | Sherman Li

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s