Typical usage scenario

Suppose the server application uses a DataStore called ds_1. This DataStore is the source of data for a target DataWindow control called dw_1 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 ds_1, calls GetFullState on ds_1, 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 dw_1.

At this point, the user can insert new rows in dw_1 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 dw_1 to ds_1.

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