CatalogExportOptions Class

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Specifies the set of options to use for a catalog export operation.

Namespace:  Microsoft.CommerceServer.Catalog
Assembly:  Microsoft.CommerceServer.Catalog (in Microsoft.CommerceServer.Catalog.dll)

Syntax

'Declaration
<SerializableAttribute> _
Public Class CatalogExportOptions _
    Inherits ExportOptions
'Usage
Dim instance As CatalogExportOptions
[SerializableAttribute]
public class CatalogExportOptions : ExportOptions
[SerializableAttribute]
public ref class CatalogExportOptions : public ExportOptions
public class CatalogExportOptions extends ExportOptions

Remarks

Export a catalog using the specified options. You export the catalog to a location on the server computer or a network share accessible to the server computer. You select the language in which you are to export the catalog data or you can export the catalog data in all languages.

Examples

internal void ExportToXmlFile(string fileName)
{
  CatalogExportOptions catalogExportOptions = new CatalogExportOptions();
  catalogExportOptions.FormatType = CatalogExportFormatType.CatalogFormatAttributeCentric;
  /*
    Set additional options
    catalogExportOptions.CatalogsToExport = "Catalog1,Catalog2";
    catalogExportOptions.Language = "en-US";
  */
  // The ImportXml returns an  ImportProgress object
  // Use the Status property to determine the current status
  ExportProgress exportProgress = this.catalogContext.ExportXml(catalogExportOptions, fileName);
  while (exportProgress.Status == CatalogOperationsStatus.InProgress)
  {
    System.Threading.Thread.Sleep(3000);
    // Call the refresh method to refresh the current status
    exportProgress.Refresh();
  }
  Console.WriteLine(exportProgress.EndDate);
  // If the export operation failed
  if (exportProgress.Status == CatalogOperationsStatus.Failed )
  {
    // Use the Errors property to get the errors that occurred during Export
    foreach (CatalogError error in exportProgress.Errors)
    {
      Console.WriteLine(error.Message);
    }
  }
}

Inheritance Hierarchy

System..::.Object
  Microsoft.CommerceServer.Catalog..::.ExportOptions
    Microsoft.CommerceServer.Catalog..::.CatalogExportOptions

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

CatalogExportOptions Members

Microsoft.CommerceServer.Catalog Namespace

Other Resources

Importing Catalog Data by Using the Catalog API

Import Options

How to Import From an XML File

How to Import Selected Fields

Exporting Catalog Data by Using the Catalog API

Export Options

How to Export to an XML File

How to Export Selected Fields