Previous in Contents Next in Contents

Remove Method

This method deletes the schedule from the project.

Syntax

ReplicationSchedule.Remove

Remarks

Example

The following example removes all of the schedules from the Test project.

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 ReplProject
set ReplProject = ReplServer.OpenProject("Test", OPEN_EXISTING_PROJECT)

dim Iterator
Iterator = 0

dim RepSched

do while True
  Err.Clear
  set RepSched = ReplProject.EnumSchedules(Iterator)

  if IsEmpty(RepSched) then exit do
  if RepSched = CRS_ERROR_NO_MORE_ITEMS then exit do

  RepSched.Remove

loop
'Release objects
set Sched       = Nothing
set ReplProject = Nothing
set ReplServer  = Nothing

See Also

ReplicationProject.AddSchedule, ReplicationProject.EnumSchedules


© 1997-2000 Microsoft Corporation. All rights reserved.