locked
Filters and batching RRS feed

  • Question

  • Hi

    Has anyone come accross a solution to this or am i missing something: 
    My  application on a win-mobile client needs a subset of data based on user selection. The data comes from the one server table : 'accounts' - which has over 350000 records. So my idea is that on the mobile device, the users will select a geographic area, and other filter criteria in order to filter the synchronization data down as small as possible.The users will then work on that subset for a while, and then upload the changes to the main database. Later on that user will select a different location to obtain a different subset of data to work with.

    When using incremental updates,Sync services seems to keep metadata pertaining to the last sync on the client. i.e. it used the last datetime or timestamp as a reference to set @synclastreceivedanchor.Im not sure whether this paramater is per table or whether its a single value for the client. So in this case, each subset filter that i do does not work because each filter needs its own @synclastreceivedanchor value. This is because changes that should have been in the new  filtered set, are not included because the new set of data needs be for changes made on the sever earlier than the last filter's last sync on the client.

    Ive worked around this by querying the SQLCE table to find the current filter's  maximum last edit/create date and passing it to the server through  syncagent.configuration.syncparameters. and then overwriting the selectincrementalcommand.commandtext  that the VS designer created to exclude the @synclastreceivedanchor and use the new paramater instead. This works well, but im having problems when trying to impliment batching as described on MSDN.
    So im wondering if would not be easier and better to use snapshot updating - i.e delete the table and dump the whole subset of data.Does this reset the @synclastreceivedanchor parameter? Does anyone think this will solve my batching problems as well?



    Im using CTP2,vs2008, SQL 2005, windows mobile 5, SQCL CE 3.5 sp1
    Ive implimented SyncCom which enables GZip compression over WCF on mobile devices
    Tuesday, July 28, 2009 4:34 PM