SetParm PowerScript function
Description
Sets the parameters
to send to the MobiLink synchronization server.
Controls
MLSynchronization, MLSync controls
Syntax
1 |
<span>SyncObject</span>.<span>SetParm</span> (<span>syncparm </span>) |
Argument |
Description |
---|---|
syncObject |
The name of the synchronization object. |
syncparm |
A structure of type SyncParm containing |
Return Values
Integer. Returns 1 for success and -1
for failure.
Examples
The code fragment below creates an instance of an
MLSync object and programmatically populates all of the necessary
properties—as well as some optional properties—using
an instance of the system SyncParm structure. Then it calls the
Synchronize function to start the database synchronization.
1 |
SyncParm Parms |
1 |
MLSync mySync |
1 |
Long rc |
1 |
1 |
mySync = CREATE MLSync |
1 |
mySync.MLServerVersion = 9 // required property |
1 |
mySync.Publication = 'salesapi '// required property |
1 |
mySync.UseLogFile = TRUE // optional |
1 |
mySync.LogFileName = "C: empsync.log "// optional |
1 |
mySync.Datasource = 'salesdb_remote '// required |
1 |
Parms.MLUser = '50 '// required |
1 |
Parms.MLPass = 'xyz123 '// required |
1 |
//The following values are required if they are not |
1 |
//set by the DSN |
1 |
Parms.DBUser = 'dba ' |
1 |
Parms.DBPass = 'sql ' |
1 |
1 |
// Apply the property values to the sync object |
1 |
mySync.<span>SetParm</span>(Parms) |
1 |
// Launch the synchronization process |
1 |
rc = mySync.Synchronize() |
1 |
destroy mySync |

Normally when you call SetParm(SyncParm)
from an MLSync object, you automatically override any authentication
values (AuthenticateParms, Datasource, DBUser, DBPass, EncryptionKey,
MLUser, and MLPass) that you set for properties of the MLSync object—even
when the value of a particular SyncParm property is an empty string.
However, if you call SetNull to set a particular
property of the SyncParm object to NULL before you call SetParm, the
property value in the MLSync object will be used instead.