Previous in Contents Next in Contents

BaseDirectory Property

This property specifies the base directory for the route.

Syntax

ReplicationRoute.BaseDirectory

Remarks

The directory path must be absolute; it cannot be relative.

Example

The following example specifies D:\Stress as the base directory for 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 ReplRoute.Name = Test then ReplRoute.BaseDirectory = "D:\Stress"

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

See Also

Get, Put


© 1997-2000 Microsoft Corporation. All rights reserved.