Hi there.
I am writing a .NET Compact Framework app that retrieves data from a SQL database via a webservice. At the moment I have a single table in the database: tblPatient.
My webservice returns the patient names located in the tblPatient as a dataset. It uses the following query: SELECT PatientName FROM tblPatient.
On the client side it loads all the patient names in a class library (as a temporary storage) and also saves the contents of the class library to an xml file (to be used for offline mode).
MY PROBLEM: I am currently loading ALL the patient names from the database via the web-service with each refresh. What I am aiming at is to be able to request, from the client app, only the changes that have occured to database since the client last requested a refresh. In other words the client's copy of the patients should always reflect the data in the database.
I thought of adding an extra attribute to my tblPatient, such as a DateTime timestamp and then requesting only the rows from the web-service that are newer than a specific DateTime. This offcoarse works fine when other clients have added or update rows in the tblPatient, but it doesn't work that well for when other clients have deleted rows from tblPatient, as the web-service has no way of telling the requesting client app which rows it should delete from its local copy, to reflect the rows that have been deleted on the database.
Any suggestions will be truly appreciated.
Many thanks.
I am writing a .NET Compact Framework app that retrieves data from a SQL database via a webservice. At the moment I have a single table in the database: tblPatient.
My webservice returns the patient names located in the tblPatient as a dataset. It uses the following query: SELECT PatientName FROM tblPatient.
On the client side it loads all the patient names in a class library (as a temporary storage) and also saves the contents of the class library to an xml file (to be used for offline mode).
MY PROBLEM: I am currently loading ALL the patient names from the database via the web-service with each refresh. What I am aiming at is to be able to request, from the client app, only the changes that have occured to database since the client last requested a refresh. In other words the client's copy of the patients should always reflect the data in the database.
I thought of adding an extra attribute to my tblPatient, such as a DateTime timestamp and then requesting only the rows from the web-service that are newer than a specific DateTime. This offcoarse works fine when other clients have added or update rows in the tblPatient, but it doesn't work that well for when other clients have deleted rows from tblPatient, as the web-service has no way of telling the requesting client app which rows it should delete from its local copy, to reflect the rows that have been deleted on the database.
Any suggestions will be truly appreciated.
Many thanks.
