The following forum(s) are migrating to a new home on Microsoft Q&A (Preview): Developing Universal Windows apps!

Ask new questions on Microsoft Q&A (Preview).
Interact with existing posts until December 13, 2019, after which content will be closed to all new and existing posts.

Learn More

 none
[UWP]How to sync sqlite with sql server using sync framework RRS feed

  • Question

  • Hi All,

    I am using sqlite db in my UWP application to manage all offline work. Now, I want to sync all data of offline sqlite db and online sql server db.

    How can I use sync framework and its adapters to implement the same.

    Regards


    • Edited by Breeze Liu Tuesday, December 5, 2017 5:30 AM [UWP]
    Monday, December 4, 2017 9:04 AM

Answers

  • Hi Prashant Srivastava01,

    >>How can I use sync framework and its adapters to implement the same.

    The Sync Framework is not suitable for your this requirement and there is no the relevant default API for it in UWP. 

    You can consider other ways to achieve your data synchronization.

    (1) You can sync data by yourself.

    You can create similar tables in the SQLite and SQL Server databases and use  a web service to sync all data of offline sqlite db and online sql server db. These synchronous operation is to compare the different between sqlite db and online sql server db, and then sync the two database data.

    In this way, you have to define the logic of your synchronization.

    (2) If you just want your sqlite db to cloud sync, then you can consider the offline features of Azure Mobile Apps.

    You can add the offline features of Azure Mobile Apps into UWP app project to support offline data sync.

    The Offline sync function allows end users to interact with a mobile app--viewing, adding, or modifying data - even when there is no network connection. Changes are stored in a local database. Once the device is back online, these changes are synced with the remote backend.

    The tutorial Enable offline sync for your Windows app shows you how to add offline support to a Universal Windows Platform (UWP) app using an Azure Mobile App backend.


    By the way, if you have any question about Microsoft Sync Framework, you can visit the Microsoft Sync Framework forum for getting suitable help.

    Best regards,

    Breeze


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Tuesday, December 5, 2017 8:27 AM