Previous in Contents Next in Contents

Enum Method

This method lists the properties of a project.

Syntax

ReplicationProject.Enum(Iterator, PropName)

Parameters

Iterator

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

PropName

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

Remarks

For a list of properties that can be retrieved from Content Deployment projects, see Global Properties.

Example

The following example lists the properties 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 PropName
dim PropVal
dim Iterator
Iterator = 0
dim ReplError

do while True
  PropVal = ReplProject.Enum(Iterator, PropName)

  '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 "Property " & PropName & " = " & PropVal
Loop

'Release objects
set ReplProject = Nothing
set ReplServer  = Nothing

See Also

EnumDestination, EnumReplications


© 1997-2000 Microsoft Corporation. All rights reserved.