Enum Method

This method lists the parameters of a project.

Syntax

ReplicationProject.Enum(Iterator, ParamName)

Parameters

Iterator

Used by the service to enumerate the list of parameters. This value should be initialized to zero, and should not be modified.

ParamName

Used by the service to enumerate the parameter names. This value should be initialized to an empty string, "", and should not be modified.

Remarks

For a list of parameters that can be retrieved from Content Deployment projects, see Parameters.

Example

The following example lists the parameters of Project1.

Option Explicit 
On Error Resume Next

const OPEN_EXISTING_PROJECT  = 2
const CRS_ERROR_NO_MORE_ITEMS  = 0&80003B17

dim ReplServer
set ReplServer = CreateObject("Crsapi.ReplicationServer")
ReplServer.Initialize("")
dim Project
set ReplProject = ReplServer.OpenProject("Project1", OPEN_EXISTING_PROJECT)

dim ParamName
dim ParamVal
dim Iterator
Iterator = 0
dim ReplError

do while True
  ParamVal = ReplProject.Enum(Iterator, ParamName)

  'Clear any error text
  Err.Clear

  'Quit if "No more items" error 

  ReplError = Err.Number
  if ReplError = CRS_ERROR_NO_MORE_ITEMS then exit do

  Wscript.Echo "Parameter " & ParamName & " = " & ParamVal
Loop

'Release objects
set ReplProject = Nothing
set ReplServer  = Nothing

See Also

EnumDestination, EnumReplications


© 1997-1998 Microsoft Corporation. All rights reserved.