SetSyncRegistryProperties PowerScript function
Description
Sets
synchronization properties in the local machine registry.
Controls
MLSynchronization, MLSync controls
Syntax
1 |
<span>SyncObject</span>.<span>SetSyncRegistryProperties</span> (<span> </span>) |
Argument |
Description |
---|---|
syncObject |
The name of the synchronization object. |
Return Values
Integer. Returns 1 for success and -1
for failure.
Usage
If necessary, the SetSyncRegistryProperties function
can create a key in the Windows registry from the value of the SyncRegistryKey
property of the synchronization object. Failure occurs if the SyncRegistryKey
property is not set in the synchronization object.
Examples
The MLSync object generated by the MobiLink wizard
for SQL Anywhere uses the following code in its Constructor event:
1 |
IF d_Registry_Build < d_this_object_build THEN |
1 |
// First time deployment of new revision - set |
1 |
//"ObjectRevision" to this revision of the wizard |
1 |
// objects and override all registry values |
1 |
   rc = this.<span>SetSyncRegistryProperties</span>() |
1 |
ELSE |
1 |
   rc = this.GetSyncRegistryProperties() |
1 |
END IF |
This code sets the values of authentication properties in
the Windows registry when the build number of the running application
is higher than the build number in the registry (or when the build
number in the registry cannot be found).