Previous in Contents Next in Contents

Creating a ReplicationProject Object

You create a new 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_NEW_PROJECT  = 1

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

dim ReplProject
set ReplProject = ReplServer.OpenProject("MyProject", OPEN_NEW_PROJECT)
'Set project parameters
...
'Commit any changes to the project
ReplProject.Committ

...

'Release objects
set ReplProject = Nothing
set ReplServer  = Nothing

© 1997-2000 Microsoft Corporation. All rights reserved.