Start Method

This method starts the project.

Syntax

ReplicationProject.Start(Flags)

Parameters

Flags

Flags for this particular replication. Specify zero (0) to use the flags already defined for the project. See the Flags appendix for a description of the flags.

Remarks

Note

You must define a project for the replication (using the ReplicationProject.Name property) before you call this method. If you have not defined a project before you call this method, Start fails, setting the error code CRS_ERROR_PROJECT_NOT_FOUND (15101).

Example

The following example starts the Project1 project with the default flags, cancelling it if it's aborted.

Option Explicit 
On Error Resume Next 

const OPEN_EXISTING_PROJECT  = 2
const REPL_STATE_ABORTED   = 4

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

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

dim ReplInst
set ReplInst = ReplProject.Start(0)

dim ReplStatus
ReplStatus = ReplInst.Status

'Quit if the status was aborted 
if ReplStatus = REPL_STATE_ABORTED then ReplClient.Cancel

'Release objects
set ReplInst    = Nothing
set ReplProject = Nothing
set ReplServer  = Nothing

See Also

Cancel


© 1997-1998 Microsoft Corporation. All rights reserved.