GetSyncRegistryProperties PowerScript function
Description
Returns
an integer to determine whether to use synchronization properties saved
in the registry.
Controls
MLSyncrhonization, MLSync controls
Syntax
|
1 |
<span>syncObject</span>.<span>GetSyncRegistryProperties</span> (<span> </span>) |
|
Argument |
Description |
|---|---|
|
syncObject |
The name of the synchronization object. |
Return Values
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 |
long rc |
|
1 |
long RegistryRevision |
|
1 |
RegistryRevision =this.GetObjectRevisionFromRegistry() |
|
1 |
IF RegistryRevision < this.ObjectRevision THEN |
|
1 |
    rc = this.SetSyncRegistryProperties() |
|
1 |
ELSE |
|
1 |
   rc = this.<span>GetSyncRegistryProperties</span>() |
|
1 |
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.