GetSyncRegistryProperties
PowerScript function
Description
Returns an integer to determine whether to use synchronization
properties saved in the registry.
Applies to
MLSynchronization, MLSync controls
Syntax
|
1 |
syncObject.GetSyncRegistryProperties ( ) |
|
Argument |
Description |
|---|---|
|
syncObject |
The name of the synchronization object. |
Return value
Integer.
Returns 1 for success and -1 for failure. Failure occurs if
SyncRegistryKey property is not set or if the key does not exist in the
Windows registry.
Usage
The GetSyncRegistryProperties function sets synchronization object
properties from values stored in the registry. The properties it can set
include: AdditionalOpts, DownloadOnly, ExtendedOpts, Host, LogFileName,
LogOpts, MLServerVersion, MLUser, ObjectRevision, Port, Publication,
UploadOnly, UseLogFile, and UseWindow.
It cannot set secured properties such as AuthenticateParms, DBPass,
and EncryptionKey that are never saved to the Windows registry.
Examples
The MLSync object generated by the MobiLink wizard for SQL Anywhere
uses the following code in its Constructor event:
|
1 2 3 4 5 6 7 8 |
long rc long RegistryRevision RegistryRevision =this.GetObjectRevisionFromRegistry() IF RegistryRevision < this.ObjectRevision THEN rc = this.SetSyncRegistryProperties() ELSE rc = this.GetSyncRegistryProperties() END IF |
This code gets the values of authentication properties stored in the
Windows registry only if the build number stored in the registry is higher
than the build number of the running application.
See also