SS3 SDK: VBScript: Can't IRS::Put() Integer Properties

ID: Q189745

The information in this article applies to:

SYMPTOMS

The following scripts, RollbacksToKeep and Port, get set incorrectly in the registry:

    Dim vPort
    Dim crsServer

    vPort = 508

    Set crsServer = CreateObject("CRSApi.ReplicationServer")
    crsServer.Initialize ("")
    crsServer.Put "Port", vPort
    crsServer.Put "RollBacksToKeep", 2
    crsServer.Commit

WORKAROUND

To work around this problem, you must force VBScript to set these parameters as type VT_I4. (VBScript defaults integer parameters to VT_I2, which the Content Replication System does not support.) IReplicationServer::Put() on integer properties can set invalid values when called from VBScript.

Set integer properties as type VT_I4. This can be done in VBScript by using the CLng() function on the value.

Keywords          : prodsitesrv3 
Version           : WINNT:3.0
Platform          : winnt
Issue type        : kbprb

Last Reviewed: August 5, 1998