locked
Passing Server Schema Changes to the Client RRS feed

  • Question

  • I've recently taken over maintenance of a project that uses the Sync frameworks. The project uses download only to get changes from a server onto the client.

    In the time since I have picked up the project, the server database schema has changed.  I changed the commands used to fetch the data to reflect the new changes to the schema, but any program that was synced before the changes throws a data type error when trying to fetch certain tables.  New installs of the program with the changes work fine.

    Is there a way to push a new schema to the application, or to invalidate the metadata and force the client to fetch all the new data and the schemas?

    Thanks
    Tuesday, December 9, 2008 2:51 PM

Answers

  • Hi Martin,

     

    Yes if there are schema changes, then you will need to hand port the changes. There is no automatic propagation of schema changes.

    This article does talk about some more information: http://msdn.microsoft.com/en-us/library/bb726035.aspx

     

    Another thing you could do is discard the client database altogether and start anew if you do not have any unsent changes on the client side. This is also assuming that your creation of the adapters etc is pretty automated and do not need to hand-craft all the changes.

     

    Tuesday, December 30, 2008 1:05 AM

All replies

  • So after spending some time debugging and investigating the problem, it turns out the cause of the error was due to a mismatch between the tombstone table and the actual data table.  By setting a breakpoint on a handler for the Server Provider SyncProgress event I was able to see exactly which table was causing the problem. 

    I manually went in and edited the tombstone table schema, and that fixed the problem right away.

    I'm pretty sure there has to be a better way then manually editing the table, which I will keep searching for in the documentation.  I think the trigger on the table would also need to be modified once the tombstone table is changed.
    Wednesday, December 10, 2008 2:37 PM
  • Hi Martin,

     

    Yes if there are schema changes, then you will need to hand port the changes. There is no automatic propagation of schema changes.

    This article does talk about some more information: http://msdn.microsoft.com/en-us/library/bb726035.aspx

     

    Another thing you could do is discard the client database altogether and start anew if you do not have any unsent changes on the client side. This is also assuming that your creation of the adapters etc is pretty automated and do not need to hand-craft all the changes.

     

    Tuesday, December 30, 2008 1:05 AM