This method adds a destination to the route.
Syntax
ReplicationRoute.AddDestination(Destination)
Parameters
Destination
The name of the server or route to add.
Remarks
Duplicate destination names are automatically eliminated from the list.
Example
The following example adds the destination server Marrakech to the Test route.
Option Explicit
On Error Resume Next
const CRS_ERROR_NO_MORE_ITEMS = 0&80003B17
dim ReplServer
set ReplServer = CreateObject("CrsApi.ReplicationServer")
ReplServer.Initialize("")
dim Iterator
Iterator = 0
dim ReplRoute
do while True
'Clear any error text
Err.Clear
'Get a route
set ReplRoute = ReplServer.EnumRoutes(Iterator)
'Quit if empty object returned (no more instances)
if IsEmpty(ReplRoute) then exit do
'Quit if "No more items" error
dim ReplError
ReplError = Err.Number
if ReplError = CRS_ERROR_NO_MORE_ITEMS then exit do
'If the route is Test, add Marrakech
if ReplRoute.Name = Test then ReplRoute.AddDestination("Marrakech")
loop
'Release objects
set ReplRoute = Nothing
set ReplServer = Nothing
See Also
EnumDestination, RemoveDestination