Accessing ReplicationProject Objects

You access a ReplicationProject object by calling the ReplicationServer.OpenProject method, as in the following example, where ReplProj is the name you give to the new ReplicationProject object:

Option Explicit 
On Error Resume Next

const OPEN_EXISTING_PROJECT  = 2

dim ReplServer
set ReplServer = CreateObject("CrsApi.ReplicationServer")
ReplServer.Initialize("")

dim ReplProject
set ReplProject = ReplServer.OpenProject("MyProject", OPEN_EXISTING_PROJECT)
...

'Release objects
set ReplProject = Nothing
set ReplServer  = Nothing

Note

You can access all of the projects on a server using the ReplicationServer.EnumProjects method.


© 1997-1998 Microsoft Corporation. All rights reserved.