Previous in Contents Next in Contents

Commit Method

This method commits changes for a project.

Syntax

ReplicationProject.Commit

Remarks

You must have Site Server Publishing administrator privileges on the server to call this method.

You must use this method to initialize a new project. There are a number of required properties that you must set before you can call the Commit method. All of these are described in the Global Properties topic.

Example

The following example specifies that the new project MyProject pulls Web pages from http://www.microsoft.com/ to C:\LocalCopy, going as many as three levels deep.

Option Explicit
On Error Resume Next

const CREATE_NEW_PROJECT = 1

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

'Create new pull project, FromMS
dim ReplProject
set ReplProject = ReplServer.OpenProject("FromMS", CREATE_NEW_PROJECT)
ReplProject.ReplicationMethod = "PULL"
ReplProject.Put("RootUrl", "http://www.microsoft.com/")
ReplProject.LocalDirectory = "C:\LocalCopy"
ReplProject.Put("Depth", "3"
ReplProject.Commit

'Release objects
set ReplProject = Nothing
set ReplServer  = Nothing

See Also

ReplicationServer.OpenProject


© 1997-2000 Microsoft Corporation. All rights reserved.