Question

I have a table with 3 columns (Syncing from MS SQL 2008 to SQLCe 3.5)

FirstName - LastName - Teacher

Teacher A should only have students sync'd to his device where he is the teacher. Teacher B should only have students sync'd to her device where she is the teacher.

I have this working without issue via a filtered column. However, if Teacher A transfers a student to Teacher B and then re-syncs his device, the changes are reflected in the server ms sql database table but the transferred student is still on Teacher A's device.

I need for each device to only have students associated with the teacher who uses the device after the syncing process.

Was it helpful?

Solution

if the database is not that big, you can just reinitialize it.

otherwise, you will have to run some client code to find all rows that no longer match your filter criteria and delete those rows. but you will have to intercept the changes when doing a sync and remove the deleted rows from the change dataset so they dont propagate back to the server (you only want the delete locally on the client), otherwise, the delete will be uploaded and your server side row will be deleted.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top