none
Using Microsoft Sync framework to sync data between flat files and Tables RRS feed

  • Question

  • Is it possible to sync data between flat files and Tables?

    My scenario is that i have the data in flat files (sent by customer) in comma delimited format and the data needs to be sync (new,updated and deleted records) with the corresponding table in the database.

    the sync should always be one way (Flat files to tables).

    Tuesday, August 21, 2012 3:46 PM

Answers

  • im not sure how sync framework can help if you can't track what change has actually occurred. sync framework is based on incremental changes or what has changed since the last sync. without knowing what was added, what was updated or what was deleted, then it wont be able to determine what to sync.
    Thursday, August 23, 2012 10:44 AM
    Moderator

All replies

  • there is no sync provider for flat files so you will have to write your own.
    Wednesday, August 22, 2012 1:22 AM
    Moderator
  • Thanks Junet, so sad that sync framework doesn't have this kind of provider.

    in case if i need to write my own provider for flat files, how difficult it is to get this implemented. is there any sample projects / resources you can refer me which will help me to get this implemented.


    Wednesday, August 22, 2012 4:57 AM
  • you can look at the samples here: http://code.msdn.microsoft.com/sync

    how does your text file mark an inserted, updated or deleted record?

    Wednesday, August 22, 2012 5:58 AM
    Moderator
  • infact the text file doesn't mark an inserted,updated or deleted records, because we receive the complete data from the client and we truncate the destination table and load the entire data. since this is not a best solution, we are trying to get some better approach to handle this scenario.

    Thursday, August 23, 2012 10:41 AM
  • im not sure how sync framework can help if you can't track what change has actually occurred. sync framework is based on incremental changes or what has changed since the last sync. without knowing what was added, what was updated or what was deleted, then it wont be able to determine what to sync.
    Thursday, August 23, 2012 10:44 AM
    Moderator
  • yes, i completly agree with you, we cannot apply sync framework here.

    Thanks for your help :-)

    Thursday, August 23, 2012 11:57 AM