These examples illustrate how a device application client uses a single synchronization parameter defined in SAP Mobile WorkSpace to synchronize data on the client with data contained in the MBO instance on SAP Mobile Server.
CustomerSynchronizationParameters sp = Customer.SynchronizationParameters;
sp.stateParam = "CA"; sp.Save(); SUP101DB.Synchronize();
SUP101DB.Synchronize();
Conclusion: You need not always set the sync parameter before a sync. If the same sync parameter value is to be used, it does not need to be set again, since it uses the previous sync parameter value.
sp.stateParam = "NY"; sp.Save(); SUP101DB.Synchronize();
Conclusion: When you save a new set of sync parameters the records returned from the synchronization includes all previous sync sets. That is, synchronization parameters are cumulative and previous sync parameters are maintained unless Delete is called on the sync parameters.
sp.Delete(); //You must re-retrieve the synchronization parameter instance sp = Customer.SynchronizationParameters; sp.stateParam = "MN"; sp.Save(); SUP101DB.Synchronize();
Conclusion: Calling Delete on the sync parameter clears the previous sync parameters. On the next sync the previous result sets for those sync parameters are removed.
It is not possible to retrieve all the synchronization parameter values except for those most recently used. When a synchronization is performed it synchronizes all sync parameter sets. That is, it attempts to load data from the SAP Mobile Server cache based on each sync parameter (for on demand this is done during the sync, for scheduled it is based on the configured schedule).