I tried going down this route before, but I did not find a cut and dry solution for doing it.
So, I had a project I started on, but abandoned instead in favor of requiring my device to communicate directly with the SQL Server.
If communicating directly with the server is not an option for you, then one of your databases (either the local one on your device or the central one on the main server) is going to need a field to denote some form of Date Stamp and your device is going to need to keep track of this Date Stamp.
DateTime dateStamp; // on Windows Mobile
private void MockUp() {
ReadDataFromServer();
dateStamp = ReadDateFromServer();
DoStuffInYourProgram();
UpdateAnythingNewerThan(dateStamp);
}
private void ReadDataFromServer() {
// read data from your central server
// and store that data into a DataSet or DataTable
}
private DateTime ReadDateFromServer() {
// this would be better in the ReadDataFromServer() method,
// but it is shown here for clarity
}
private void DoStuffInYourProgram() {
// This isn't a real routine, but rather what you are going
// to have your device doing
}
private void UpdateAnythingNewerThan(DateTime value) {
// read records from your server that are newer than the value
// passed in, then update those values with the new data your
// device has collected.
}
I wished I could be less vague, but that should give you the general idea.