locked
How to send only data pertaining to the current logged user RRS feed

  • Question

  • We are using sync in a n-tier architecture.

     

    We have a mobile device that can be used by multiple users. Each sync brings only data for that user. Is it possible to send to the server only data changed by the user that is performing the sync? 

     

    Is there a way to hook into what's being selected to be sent and to ignore the records that doesn't concern the logged in user?

    Friday, August 6, 2010 1:28 PM

Answers

  • I decided to take another approach. To have one database per user instead of one database for all users.
    • Marked as answer by GoDaddy Friday, August 6, 2010 6:25 PM
    Friday, August 6, 2010 6:25 PM

All replies

  • This might help:

    http://jtabadero.spaces.live.com/blog/cns!BF49A449953D0591!1203.entry?sa=927184842

    On the OnInitialized() method on the server add code to change the SelectIncremental commands to add filtering (in the WHERE clause). Not very elegant but could work.

     

    Friday, August 6, 2010 2:53 PM
  • I'm not looking at how to filter data to be sync to be sent from the server to the client. But the reverse : how to send a subset of data from the client to the Server (which is a WCF service in N-Tier)

    Friday, August 6, 2010 3:07 PM
  • I decided to take another approach. To have one database per user instead of one database for all users.
    • Marked as answer by GoDaddy Friday, August 6, 2010 6:25 PM
    Friday, August 6, 2010 6:25 PM
  • you can intercept the change dataset in the WCF proxy call to upload the changes. The changes would be in the SyncContext, you can then loop thru the dataset and remove the rows you dont want to be uploaded.

    Saturday, August 7, 2010 9:59 PM