CReplicationProject.BusinessDataProject Property
Gets or sets a Boolean value that indicates whether the project is used to replicate business data.
Note
This property is valid only for business data projects.
bool BusinessDataProject { set; get; }
Return Value
true if the project is used to replicate business data; otherwise, false.
Remarks
When the value of this property is true, you must also set the BusinessDataProjectXml property.
The CReplicationProject.BusinessDataProject property corresponds to the COM property named ReplicationProject.BusinessDataProject.
Example
The following example creates a new business data project named BusinessDataProj, specifies the project type, and specifies the contents and location of its XML configuration file, C:\Config\Config.xml.
CReplicationServer replicationServer = new CReplicationServer();
replicationServer.Initialize("");
CReplicationProject replicationProject;
replicationProject = (CReplicationProject)replicationServer.OpenProject("BusinessDataProj", CSS_PROJECT_CREATION.CREATE_NEW_PROJECT);
replicationProject.BusinessDataProject = true;
replicationProject.set_LocalDirectory(@"c:\Directory");
XmlDocument xmlDocument = new XmlDocument();
xmlDocument.Load(@"C:\Config\Config.xml");
replicationProject.BusinessDataProjectXml = xmlDocument.InnerXml;
replicationProject.AddDestination("MyDest");
replicationProject.Commit();
/* Content of C:\Config\Config.xml
<?xml version="1.0" encoding="utf-8" ?>
- <BusinessDataProjectProperties xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" BusinessProjectName="BusinessDataProj">
<BusinessProjectHeader MajorVersion="1" MinorVersion="1" Revision="1" Build="1" />
<Source>CSharpSite</Source>
<Destination>DestinationSite</Destination>
<Role>SourceAndDestination</Role>
- <BusinessData BusinessDataID="b0a1b3d6-a70a-4ce8-ab4b-24d611586783" BusinessDataTypeName="Catalog">
<ExportOption Name="MODE" Val="FULL" />
<ExportOption Name="SCHEMAEXPORTTYPE" Val="RELEVANT" />
<ExportOption Name="EXPORTDELETEDITEMS" Val="YES" />
<ExportOption Name="EXPORTEMPTYVALUES" Val="YES" />
<ExportOption Name="CATALOGSTOEXPORT" Val="Adventure Works Catalog" />
<ExportOption Name="CATALOGSTOEXPORT_SOURCECULTURE" Val="Adventure Works Catalog" />
<ExportOption Name="PROPERTIESTOEXPORT_SOURCECULTURE" Val="BaseCatalog Name,Catalog Name,Category Name,List Price,Definition Name,Description,Display Name,Type,Image_filename,Image_height,Image_width,Date of Introduction,Is Searchable,Last Modified,Name,OnSale,Primary Parent Category,SKU,Color,Product Id,Size,Category Pricing,VariantCode,VariantId" />
<ExportOption Name="EXPORTASVIRTUALCATALOG" Val="YES" />
<ExportOption Name="EXPORTDEPENDENTBASECATALOGS" Val="NO" />
<ExportOption Name="CATALOGSETSTOEXPORT" Val="NO" />
<ImportOption Name="MODE" Val="FULL" />
<ImportOption Name="ERRORTHRESHOLD" Val="1" />
<ImportOption Name="OVERWRITERELATIONSHIPS" Val="YES" />
<ImportOption Name="TRANSACTIONMODE" Val="NO" />
<ImportOption Name="MATERIALIZEVIRTUALCATALOG" Val="NO" />
<ImportOption Name="IMPORTSCHEMACHANGES" Val="YES" />
<ImportOption Name="GENERATEFULLTEXTINDEXES" Val="NO" />
<ImportOption Name="REFRESHCACHE" Val="NO" />
</BusinessData>
</BusinessDataProjectProperties>
*/
See Also
Other Resources
How to Create and Modify a Staging Project
CSS Business Data XML Configuration File Syntax Elements
CReplicationProject.BusinessDataProjectXml Property