ICatalogManager::ExportXML

Ee798893.c++_off(en-US,CS.10).gifEe798893.vb_on(en-US,CS.10).gif

Use this method to export catalog data to an Extensible Markup Language (XML) file.

Definition

HRESULT ICatalogManager::ExportXML(BSTRstrXMLFilePath,VARIANTstrCatalogsToExportVARIANT_BOOLfRunSynchronously);

Parameters

strXMLFilePath

[in] A BSTR that contains the path and file name of the XML file to be created.

strCatalogsToExport

[in, optional] A VARIANT that contains the catalogs to export. See the Remarks section for more information.

fRunSynchronously

[in, defaultvalue (0)] A VARIANT_BOOL that specifies whether the method should be run synchronously. A value of True indicates that the method will not return until the export is completed. A value of False indicates that the method will return immediately after spawning the export thread.

Return Values

This method returns an HRESULT indicating it completed successfully.

Error Values

This method returns S_OK (0x00000000) to indicate success and either standard or custom COM HRESULT error values to indicate failure. For more information about standard COM errors, see Standard COM Errors.

The following table shows the custom COM errors that this method can return.

Constant Value Description
E_CAT_IMPORT_IN_PROGRESS 0x88980025 There was an existing import method call that had not yet completed. This method cannot run while an import is in progress.
E_CAT_FILE_CREATION_FAILED 0x88980018 The method was unable to create the output file.

Additional information may be available using the global Err object, which can be accessed using the API function GetErrorInfo. In particular, the GetDescription method of the IErrorInfo interface may return a text description of the error.

Remarks

If the parameter strCatalogsToExport is missing, or contains an empty string, then all catalogs are exported. Otherwise the parameter strCatalogsToExport is a comma-separated list of catalog names to be exported.

Ee798893.note(en-US,CS.10).gifNote

  • This method runs in a separate thread. Prior to spawning the thread, it checks that there is not an existing ExportCSV, ExportXML, ImportCSV or ImportXML method in progress. Once the new thread is spawned, this method returns immediately, if fRunSynchronously is False, with no errors. Any errors that occurred while importing the catalog are logged to the Windows NT Event Log. Use the Windows Event Viewer to view the Windows NT Event Log.

  • If there is a temporary loss of the SQL connection, longer than two minutes, an import or export will be aborted. Other methods should work after the interruption.

Ee798893.caution(en-US,CS.10).gif Caution

  • Changes made to the catalog while an export is in progress may or may not be reflected in the output file. Additions and deletions made during the export could result in a corrupt file. Changes should be avoided during an export.

For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.

See Also

CatalogManager Object

ICatalogManager::ExportCSV

ICatalogManager::ImportXML


All rights reserved.