Typical usage scenario

Suppose the server application uses a DataStore called ds1. This DataStore is the source of data for a target DataWindow control called dw1 on the client. The server application connects to the database, creates a DataStore, and assigns the DataWindow object to the DataStore.

In one of its functions, the server application issues a Retrieve method for ds1, calls GetFullState on ds1, and then passes the resulting DataWindowFullState object to the client.

Once the client has the FullState object, it calls SetFullState to apply the state information from FullState to dw1.

At this point, the user can insert new rows in dw1 and change or delete some of the existing rows. When the user makes an update request, the client calls GetChanges and invokes another function that passes the resulting DataWindowChanges object back to the server. The server application function then calls SetChanges to apply the changes from dw1 to ds1.

After synchronizing ds1 with dw1, the server application updates the database. If the update was successful, the client calls ResetUpdateStatus to reset the status flags on the client DataWindow.