Get Method

This method retrieves a parameter for the route.

Syntax

ReplicationRoute.Get(ParamName)

Parameters

ParamName

The name of the parameter to get. The only parameter available is BaseDirectory, which identifies the directory from which the content is replicated.

Example

The following example retrieves and displays the value of the BaseDirectory parameter for all routes.

Option Explicit 
On Error Resume Next 

const CRS_ERROR_NO_MORE_ITEMS   = 0&80003B17

dim ReplServer, Iterator, ReplRoute, BaseDirectory 
set ReplServer = CreateObject("CrsApi.ReplicationServer")
ReplServer.Initialize("")

Iterator = 0

do while True
  'Clear any error text
  Err.Clear
  'Get a route
  set ReplRoute = ReplServer.EnumRoutes(Iterator)

  'Quit if "No more items" error 
  if Err.Number = CRS_ERROR_NO_MORE_ITEMS then exit do

  BaseDirectory = ReplRoute.Get("BaseDirectory") 

  if IsEmpty(BaseDirectory) = False then
    Wscript.Echo "The base direcory for route " & ReplRoute.Name _
    & " is " & BaseDirectory 
  end if

Loop
'Release objects
set ReplRoute  = Nothing
set ReplServer = Nothing

See Also

BaseDirectory, Put


© 1997-1998 Microsoft Corporation. All rights reserved.