ReplicationClient

Use the ReplicationClient object to have finer control over replications. You can create your own replication scheme by using the ReplicationClient methods and properties with ReplicationItem objects (see ReplicationProject.EnumItems).

Content Deployment replications operate on entire directories. The ReplicationClient object lets you replicate specific files on demand. This provides more granular control over the replication process and, since it is single-file based, provides much more detailed error reporting through the ReplicationClientError object.

You get access to a ReplicationClient object by calling CreateObject, as follows:

Set RepClient = CreateObject("CrsApi.ReplicationClient")

Once you have access to the ReplicationClient object, you must call the Initialize method, unless the object is created through a ReplicationProject object, in which case you need not call Initialize.

Use the Connect method and the Disconnect method in conjunction with the SendFile and DeleteFile methods when you need to update more than one or two files. If you only need to update one or two files, use just the SendFile method or DeleteFile method without the Connect and Disconnect methods (they perform their own connections and disconnections to the destination server if the Content Deployment server isn't connected to a destination server).

To update a number of files

  1. Use the Connect method to establish a connection to the destination server.

  2. Use the SendFile method to send a file to the destination server or the DeleteFile method to delete a file from the destination server.

  3. Use the Disconnect method to sever the connection to the destination server.

If your Content Deployment server is connected to the destination server and transaction processing is turned on at the destination server, file operations are not applied until you call either the Disconnect method or the Commit method.

You can issue an Abort method at any time during a transaction to cancel all pending transactions.

The Content Deployment component will not allow you to use both the ReplicationClient and ReplicationServer objects at the same time to run the same project. If you try to use both, Content Deployment issues the error code CRS_ERROR_PROJECT_ALREADY_RUNNING.


© 1997-1998 Microsoft Corporation. All rights reserved.