locked
Best way to restrict the local store size RRS feed

  • Question

  • I have some instrumentation implemented in an application and the instrumentation tables are Upload Only. It creates lots of entries as users keep requesting / sending data. I want to log those into server tables and then delete it from local table as that would give some KB's of free space for me.

    Is there a way to know that the specific row is sync'ed to the server that i can find those rows and delete it in local store. If i delete a row from local store., does the sync delete it from Server too the next time it tries to sync? How can we avoid deleting from server but allow delete in local store ?


    • Edited by Viswanth Tuesday, September 13, 2011 5:03 AM
    Tuesday, September 13, 2011 5:02 AM

Answers

  • Sync framework will tell you if there are conflicts or errors during sync. if there are no conflicts or errors, then you can assume they were applied.

    If you want to be sure, then you can query the database directly and compare the change dataset from the ChangesApplied event of the remote provider

    • Marked as answer by Viswanth Thursday, September 15, 2011 6:54 AM
    Wednesday, September 14, 2011 6:15 AM

All replies

  • everytime you finish the sync to the server, delete the rows from the client.

    then everytime you sync,  intercept the change dataset in the ChangesSelected event of the local provider and remove the deleted rows so they dont get applied to the server.

    see a sample of how to intercept and remove deletes here: http://jtabadero.wordpress.com/2011/03/07/manipulating-the-change-dataset-in-sync-fx/

     

     

    Tuesday, September 13, 2011 5:17 AM
  • Thanks for the links. My condition is, i have a upload only sync table and after uploading the changes to the server, i have to delete the rows in client. In OCS, how do we determine that the row is uploaded to the server so that it would be safe to delete them in the local store?
    Wednesday, September 14, 2011 1:32 AM
  • Sync framework will tell you if there are conflicts or errors during sync. if there are no conflicts or errors, then you can assume they were applied.

    If you want to be sure, then you can query the database directly and compare the change dataset from the ChangesApplied event of the remote provider

    • Marked as answer by Viswanth Thursday, September 15, 2011 6:54 AM
    Wednesday, September 14, 2011 6:15 AM