locked
Synchronization to SQLCE duplicates columns RRS feed

  • Question

  •  

    Hi *,

     

    I have a simple table on server. It has 3 columns (#id, nazev, cena, ...). If I sync this table (only this) to SQL CE it creates table with columns (id, nazev, cena, id1, nazev1, cena1, ...). Why? I expect to have same columns and some __sys... Nothing more.

     

    Is this right? Or am I doing something wrong?

     

    JC

    • Moved by Max Wang_1983 Friday, April 22, 2011 9:19 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Friday, December 14, 2007 1:02 PM

Answers

  • Hi,

     

    as I said. It's simple table. No view, no join. The second hint, isn't clear to me. Sad

     

    But the problem is more simple. I'm adding the columns to SqlSyncAdapterBuilder for tombstone table in wrong way - using DataColumns collection instead of TombstoneDataColumns. Damn copy'n'paste. Smile

     

     

    Friday, December 14, 2007 6:36 PM

All replies

  • Hi,

     

    Well, I've seen similar behavior when I try to join two tables where some column is collected twice. In this case the .net provider adds a number to the duplicated column name.

     

    I would also check the command and make sure that it explicitly returns those name columns (don't use select *). Also, make sure you are not accessing the server table through a view.

     

    Thanks

    Friday, December 14, 2007 5:56 PM
  • Hi,

     

    as I said. It's simple table. No view, no join. The second hint, isn't clear to me. Sad

     

    But the problem is more simple. I'm adding the columns to SqlSyncAdapterBuilder for tombstone table in wrong way - using DataColumns collection instead of TombstoneDataColumns. Damn copy'n'paste. Smile

     

     

    Friday, December 14, 2007 6:36 PM