SetParm

Description

Sets the parameters to send to the MobiLink synchronization server.

Applies to

MLSynchronization, MLSync controls

Syntax

SyncObject.SetParm (syncparm )

Argument

Description

syncObject

The name of the synchronization object.

syncparm

A structure of type SyncParm containing property values that can be set as synchronization parameters.


Return value

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.

SyncParm         Parms
MLSync         mySync
Long         rc
 
mySync = CREATE MLSync
mySync.MLServerVersion = 9      // required property
mySync.Publication = 'salesapi   '// required property
mySync.UseLogFile = TRUE      // optional
mySync.LogFileName = "C:\temp\sync.log   "// optional
mySync.Datasource = 'salesdb_remote   '// required
Parms.MLUser = '50         '// required
Parms.MLPass = 'xyz123         '// required
//The following values are required if they are not 
//set by the DSN
Parms.DBUser = 'dba      '
Parms.DBPass = 'sql      '
 
//  Apply the property values to the sync object
mySync.SetParm(Parms)   
//  Launch the synchronization process
rc = mySync.Synchronize()   
destroy mySync

Maintaining property settings in the MLSync object

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.

See also

GetCommandString

SetNewMobiLinkPassword

SetSyncRegistryProperties