locked
get more than 1000 records from azure storage using wcf data service RRS feed

  • Question

  • HI,

    i have a wcf data service running which getst the data from the azure storage to the client. It just retrieves the first 1000 records even when i try to do what people suggest in the following discussion:

    http://social.msdn.microsoft.com/Forums/en-US/windowsazure/thread/f60a4662-a025-4649-b503-edfb0848636f

    Although i can pull more than 1000 records if i directly connect to storage and do it as per the thread above.

    I am not sure why when i do the same stuff from the client through wcf service i get just 1000 records...probably i need to change something at the service level to allow it to send more than 1000 records. i changed the stuff in service to something like this in my iupdatable implementation:

     

     

    public IQueryable<Fact> tablename

    {

     

     

    get { return this.context.tablename.AsTableServiceQuery<tablename>(); }

    }

    and then on client side i get the result in CloudTableQuery<tablename> but i still get only 1000 records..probably something i am missing at my service later in order to make it work...

    any pointers?

    Manish

    Friday, December 24, 2010 3:26 AM

All replies

  • Hi Manish,

    There is nothing you have to change at the service level. Basically all you need to do is to use the .AsTableServiceQuery() on the LINQ query you are running against your Data Service. Have a look at this post for some more info.

    Hope this helps.

    Edward

    Friday, December 24, 2010 9:40 PM
  • i had already tried that...it gives me just 1000 records even when i do .AsTableServiceQuery() on the linq query aginst the data service...

     

     

     

    CloudTableQuery<Fact> fquery =

    (

     

    from a in dc.Fact

     

     

    where a.SubsidiaryId == p

     

     

    select a).AsTableServiceQuery<Fact>();

    where dc is data context to wcf data services which is exposing that fact table as Iquarable..

    as i said before if i try to retrrive the data directly connecting to azure storage using table service context i can retrieve more than 1000 records if i use the above mechanism. However when i do it though the wcf data services then it retrieves just 1000 records.... :(

    Manish

    Saturday, December 25, 2010 6:00 AM
  • Can you run fiddler/wireshark/netmon and share the request/response packets in the two cases - one where you get 1000 records and the one case where you do not?

    Thanks,

    jai

    Saturday, March 26, 2011 8:41 PM