Previous in Contents Next in Contents

Put Method

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

Syntax

ReplicationProject.Put(PropName, PropValue)

Parameters

PropName

Name of the property.

PropValue

The property value.

Remarks

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

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

Example

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

Option Explicit 
On Error Resume Next 

const OPEN_EXISTING_PROJECT  = 2

dim ReplServer, Hops

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

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

Hops = Clng(3)

ReplProject.Put("Depth", Hops)

'Release objects
set ReplProject = Nothing
set ReplServer  = Nothing

See Also

Get


© 1997-2000 Microsoft Corporation. All rights reserved.