Put Method

This method sets the value of a parameter for the project.

Syntax

ReplicationProject.Put(ParamName, ParamValue)

Parameters

ParamName

Name of the parameter.

ParamValue

The parameter value.

Remarks

Parameters are not set for the project until they are committed by using ReplicationProject.Commit. For a list of project parameters, see the Parameters appendix.

Note   You must explicitly cast any whole number value that you assign to a global parameter to a 32-bit (long) integer with CLng(), as shown in the following example.

Example

The following example sets the Depth parameter (the depth of the replication) to 3 for project MyProject.

Option Explicit 
On Error Resume Next 

const OPEN_EXISTING_PROJECT  = 2

dim ReplServer, Depth

set ReplServer = CreateObject("CrsApi.ReplicationServer")
ReplServer.Initialize("")

dim ReplProject
set ReplProject = ReplServer.OpenProject("MyProject", OPEN_EXISTING_PROJECT)

Depth = Clng(3)

ReplProject.Put("Depth", Depth)

'Release objects
set ReplProject = Nothing
set ReplServer  = Nothing

See Also

Get


© 1997-1998 Microsoft Corporation. All rights reserved.