Creates a Replica.
[Visual Basic .NET] Public Function CreateReplica ( _ ByVal parentVersion As String, _ ByVal ReplicaName As String, _ ByVal replicaDesc As IGPReplicaDescription, _ ByVal repOptions As IGPReplicaOptions, _ ByVal exportOptions As IGDSExportOptions, _ ByVal TransportType As esriGDSTransportType _ ) As IGDSData
[C#] public IGDSData CreateReplica ( string parentVersion, string ReplicaName, IGPReplicaDescription replicaDesc, IGPReplicaOptions repOptions, IGDSExportOptions exportOptions, esriGDSTransportType TransportType );
[C++]
HRESULT CreateReplica(
BSTR parentVersion,
BSTR ReplicaName,
IGPReplicaDescription* replicaDesc,
IGPReplicaOptions* repOptions,
IGDSExportOptions* exportOptions,
esriGDSTransportType TransportType,
IGDSData** result
);
[C++]Parameters
parentVersion [in] parentVersion is a parameter of type BSTR ReplicaName [in] ReplicaName is a parameter of type BSTR replicaDesc [in]replicaDesc is a parameter of type IGPReplicaDescription
repOptions [in]repOptions is a parameter of type IGPReplicaOptions
exportOptions [in]exportOptions is a parameter of type IGDSExportOptions
TransportType [in]TransportType is a parameter of type esriGDSTransportType
result [out, retval]result is a parameter of type IGDSData
Product Availability
Remarks
This method is used to create a replica in a disconected environment. You may create either a two way replica, a one way replica or a check-out replica. To create replicas in a connected environment, see IReplicationAgent2::CreateReplica2.
The parentVersion parameter is the version on the geodatabase represented by the geodatataserver that the replica will be created from. ReplicaName is the name for the replica.
The replicaDesc parameter is a description of the data to replicate as well as various settings that define how the data will be replicated. For example, you can set a spatial filter, set the replica model type, and specify whether or not to include related data. See the GPReplicaDescription coclass for more information.
The repOptions parameter is used to set various replica options such as the replica access type and the initial data sender. See the GPReplicaOptions coclass for more information.
The exportOptions parameter defines the output of the method. This includes the outut format and whether or not the output will be compressed. See GDSExportOptions for more information.
If exporting to XML or FileGDBTransport, the output of this method is used with the ImportData method to import the replica into a destination geodatabase and complete replica creation. For check-out replicas, you can also choose to replicate directly to a file geodatabase or personal geodatabase. Here the output is the replica geodatabase and therefore no import is required.
FileGDBTransport is not supported when IGPReplicaOptions registerExistingDataOnly flag is set to true. To create a replica by registering existing data only, export to XML instead.
The TransportType indicates the desired transport type. Use esriGDSTransportTypeURL to place the output in a file in the virtual output directory. Use esriGDSTransportTypeEmbedded to have the results embedded in the output GDSData object. If no virtual output directory exists, the results will be embedded regardless of the value set for this parameter.
When executed, the method returns a GDSData object. See the GDSData coclass for more information.
The How to create a replica in a disconnected environment topic describes how to create a replica using this method.