none
Namespace for RelationalSyncProvider.BatchingDirectory? RRS feed

  • Question

  • Trying to implement batching (memory-based), the runtime Version for my Microsoft.Synchronization.Data is: v2.0.50727.

    Why can I not find the BatchingDirectory or MemoryDataCacheSize properties?

    This code won't work because the property is not in the namesapce:

    SqlCeClientSyncProvider

    clientSyncProvider = new SqlCeClientSyncProvider();

    clientSyncProvider.BatchingDirectory;

    Results on the server provider were the same ... not in namesapce.

    Monday, May 9, 2011 2:17 PM

Answers

  • Memory based batching is only available on the SqlCeSyncProvider/SqlSyncProvider and not with the older SqlCeClientSyncProvider/DbServerSyncProvider.

    • Marked as answer by P H T Tuesday, May 10, 2011 2:47 PM
    Monday, May 9, 2011 2:21 PM
    Moderator
  • nope, the designer only works with the older provider.

    to use SqlCeSyncProvider/SqlSyncProvider, you have to code the provisioning part which is not that hard.

    you'll find tutorials/walktroughs in the documentation that comes with the installation or you can read at http://msdn.microsoft.com/en-us/library/ee617382(v=SQL.110).aspx

    • Marked as answer by P H T Tuesday, May 10, 2011 2:47 PM
    Monday, May 9, 2011 2:36 PM
    Moderator
  • "provisioning" is the part the prepares your database to participate in synching. its where it creates the necessary database objects that does change tracking, change enumeration and change application.

     

    yes, you will have to modify your WCF codes as well and you have to refactor both client and server side to use SqlCeSyncProvider on the client and SqlSyncProvider on the server side. you cannot mix and match providers from older offline provider and the newer ones.

    yes, the SyncDirection is now applied at the scope level instead of the table. you can group together all download only tables in a single scope, all upload only in another scope, all bidirectional on another and so on...

    unfortunately, there are no references that am aware of migrating between the offline provider and the newer collaboration providers. besides there is not much that you can re-use in your existing code when you migrate apart from the event handlers for events such as ApplyChangesFailed, ChangesSelected, etc...

    • Marked as answer by P H T Tuesday, May 10, 2011 2:47 PM
    Monday, May 9, 2011 11:41 PM
    Moderator
  • the SyncOrchestrator/SqlSyncProvider/SqlCeSyncProvider does not support dynamically passing parameter values. The filter and the filter value is defined as part of the scope or scope template. 

    Sync Fx 4.0 release has been postponed and the current CTP code will be released as code samples instead. most of the v4 bits are for supporting Silverlight, WP7 and other devices and it internally uses v2.1 bits (SqlSyncProvider).

    • Marked as answer by P H T Tuesday, May 10, 2011 2:47 PM
    Tuesday, May 10, 2011 2:44 PM
    Moderator

All replies

  • Memory based batching is only available on the SqlCeSyncProvider/SqlSyncProvider and not with the older SqlCeClientSyncProvider/DbServerSyncProvider.

    • Marked as answer by P H T Tuesday, May 10, 2011 2:47 PM
    Monday, May 9, 2011 2:21 PM
    Moderator
  • Thanks.

    Initially my solution was built with the designer ... can I use the designer to generate code for the newer providers?


    Actually, how do I get the new providers?
    Monday, May 9, 2011 2:27 PM
  • nope, the designer only works with the older provider.

    to use SqlCeSyncProvider/SqlSyncProvider, you have to code the provisioning part which is not that hard.

    you'll find tutorials/walktroughs in the documentation that comes with the installation or you can read at http://msdn.microsoft.com/en-us/library/ee617382(v=SQL.110).aspx

    • Marked as answer by P H T Tuesday, May 10, 2011 2:47 PM
    Monday, May 9, 2011 2:36 PM
    Moderator
  • When you say the "provisioning part" ... I see that the designer generated server-side code (BTW I am using n-Tier with WCF) is based off the older DbServerSyncProvider.  I would have to modify all that plumbing in addition to the client-side provisioning too ... right?  I am trying to implement batching ... can I do that entirely from the client provisioning code or do I have to rewrite the server for SqlSyncProvider (and is this as different in structure from the old provder as the client is turning out to be)?

    Also, in re-working the client-side provisioning ... it is much different in 2.x than 1.0 ... are there any helpful links you are quickly aware of to help with understanding migration to 2.x?  For example, adding tables with CreationOption and SyncDirection properties was easily done on a table-by-table basis ... now I see there is a scope that needs to be defined where some properties are on the scope and not the tables.

    Monday, May 9, 2011 8:21 PM
  • "provisioning" is the part the prepares your database to participate in synching. its where it creates the necessary database objects that does change tracking, change enumeration and change application.

     

    yes, you will have to modify your WCF codes as well and you have to refactor both client and server side to use SqlCeSyncProvider on the client and SqlSyncProvider on the server side. you cannot mix and match providers from older offline provider and the newer ones.

    yes, the SyncDirection is now applied at the scope level instead of the table. you can group together all download only tables in a single scope, all upload only in another scope, all bidirectional on another and so on...

    unfortunately, there are no references that am aware of migrating between the offline provider and the newer collaboration providers. besides there is not much that you can re-use in your existing code when you migrate apart from the event handlers for events such as ApplyChangesFailed, ChangesSelected, etc...

    • Marked as answer by P H T Tuesday, May 10, 2011 2:47 PM
    Monday, May 9, 2011 11:41 PM
    Moderator
  • Thanks for all the info!

    In 2.0, can I still pass "global" (i.e. used by all the sync queries) SQL parameters like I do now through the SyncAgent like this:

    syncAgent.Configuration.SyncParameters.Add(

    new SyncParameter("@POC_UserID", textboxEmployeeID.Text))

    The 2.0 examples I have seen show passing the same parameter to each table in the scope definition.

    Is this a 2.0 change or have I just not found the 2.0 implementation in the SyncOrchestrator?

    Also, since I am doing a pretty significant rewrite here ... I am wondering if I should just go to SFx 4.0 ... can you give me any insight to how different 4.0 is from 2.0 (as far as does 4.0 preserve more of the 2.0 namespaces/structure than 2.0 did from 1.0)?

    Only thing I have seen about 4.0 release is that it is CTP and will be released for production systems in 2011 ... is this still the latest?

     

    Tuesday, May 10, 2011 2:11 PM
  • the SyncOrchestrator/SqlSyncProvider/SqlCeSyncProvider does not support dynamically passing parameter values. The filter and the filter value is defined as part of the scope or scope template. 

    Sync Fx 4.0 release has been postponed and the current CTP code will be released as code samples instead. most of the v4 bits are for supporting Silverlight, WP7 and other devices and it internally uses v2.1 bits (SqlSyncProvider).

    • Marked as answer by P H T Tuesday, May 10, 2011 2:47 PM
    Tuesday, May 10, 2011 2:44 PM
    Moderator