ObjectRevision

Applies to

MLSynchronization and MLSync objects

Description

Specifies the build number for synchronization property values that are stored in the client registry.

Usage

When you deploy a new version of an application that includes a wizard-generated synchronization object, you can make sure that values for synchronization object properties are written to the application user's registry by incrementing the value of the ObjectRevision property. Code in the synchonization object's Contructor event checks the value of this property against the value stored during a previous synchronization.

If the value of the ObjectRevision property is higher than the value stored in the registry, property values of the synchronization object are written to the registry, replacing any values previously stored there. The property values written to the registry are: AdditionalOpts, DownloadOnly, ExtendedOpts, Host, LogFileName, LogOpts, MLServerVersion, MLUser, ObjectRevision, Port, Publication, UploadOnly, UseLogFile, and UseWindow.

Secured properties such as AuthenticateParms, DBPass, and EncryptionKey are never written to the registry.

In a painter

On the Settings tab of the Properties view for an MLSync object, type the value you want for the ObjectRevision property in the Object Revision Number text box.

In scripts

The following code is similar to code in the Constructor event of the MLSync object generated by the MobiLink synchronization wizard. It checks the ObjectRevision value against the revision number stored in the registry. If the registry value is less than the value of the ObjectRevision value, the object's synchronization properties are written to the registry. Otherwise, the synchronization object retrieves the values stored in the registry:

long      rc = 1
long      RegistryRevision
if this.ObjectRevision > 0 and &
  this.SyncRegistryKey <> "" then 
    RegistryRevision = &
       this.GetObjectRevisionFromRegistry()
    if RegistryRevision < this.ObjectRevision then
       rc = this.SetSyncRegistryProperties()
    else
       rc = this.GetSyncRegistryProperties()
    end if
end if
return rc