locked
SyncAdapters Collection RRS feed

  • Question

  • Hi All,

     

    I have written some extensions to the tool-generated SyncAdapter classes to perform some custom steps.  One thing that I need to do is re-order the DbServerSyncProvider.SyncAdapters collection.  The default order as produced by the tool is T2, T3, T1 and I need T1, T2, T3.  I clear the collection in OnInitialized() and then try to re-add the SyncAdapters in the correct order.  The Clear() works - the collection says it's empty when I try to add, but the Add() throws an exception stating that the SyncAdapter already exists in the collection.  Does anyone have any ideas?  Currently, I'm stuck manually changing the order in the .Designer.sync file which, of course, can get overwritten by the tool.

    Thanks,
    James

    • Moved by Max Wang_1983 Thursday, April 21, 2011 6:06 PM forum consolidation (From:SyncFx - Technical Discussion [ReadOnly])
    Monday, October 27, 2008 3:55 PM

Answers

  • The Adapters should be in the order that the tables are added. Can you check if you are adding the tables in the right order?

     

    Can you share your repro code snippet?

     

    Friday, October 31, 2008 5:49 AM

All replies

  • The Adapters should be in the order that the tables are added. Can you check if you are adding the tables in the right order?

     

    Can you share your repro code snippet?

     

    Friday, October 31, 2008 5:49 AM
  • Thanks Mahesh!  I had been checking every table that I needed on the list and then adding - this results in the sync adapters being added in alphabetical order.  If I add the tables individually then I can control the order.  Thanks again.

    Friday, October 31, 2008 4:03 PM