ICatalogManager3::DeltaExportXML Method [C++]
Use this method to export updated catalog data to an Extensible Markup Language (XML) file.
Definition
[C++]
HRESULT ICatalogManager3::DeltaExportXML(VARIANTvrXML,
VARIANTvrTimeStamp,
VARIANTstrCatalogsToExport,
VARIANT_BOOLfRunSynchronously,
CatalogXMLFmtEnumeXMLFmtBSTRstrLang,
);
[Visual Basic]
Sub DeltaExportXML(vrXML As Variant,
Optional vrTimeStamp As Variant,
Optional strCatalogsToExport As Variant,
Optional fRunSynchronously As Boolean,
Optional eXMLFmt As CatalogXMLFmtEnumOptional strLang As String,
)
Parameters
- vrXML[C++]
[in] A VARIANT that contains the XML file name or IStream object that is the target of the export. - vrXML[Visual Basic]
A Variant that contains the XML file name or IStream object that is the target of the export. - vrTimeStamp[C++]
[in, optional] A VARIANT that contains the time stamp that specifies the limit of the export. The Variant can of type Cdate or a String that can be converted to a valid date. - vrTimeStamp[Visual Basic]
A Variant that contains the time stamp that specifies the limit of the export. The Variant can of type Cdate or a String that can be converted to a valid date. - strCatalogsToExport[C++]
[in, optional] A VARIANT that contains the catalogs to export. See the Remarks section for more information. - strCatalogsToExport[Visual Basic]
A Variant that contains the catalogs to export. See the Remarks section for more information. - fRunSynchronously [C++]
[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. - fRunSynchronously [Visual Basic]
A Boolean 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. The default value is False. - eXMLFmt[C++]
[in, optional, defaultvalue (0)] A CatalogXMLFmtEnum enumeration that specifies the XML format. See the Remarks section for valid values. - eXMLFmt[Visual Basic]
A CatalogXMLFmtEnum enumeration that specifies the XML format. See the Remarks section for valid values. - strLang[C++]
[in, optional, defaultvalue ("")] A BSTR that contains the culture name. The culture name follows the RFC 1766 standard in the format "<languagecode2>-<country/regioncode2>" where <languagecode2> is a lowercase two-letter code derived from ISO 639-1 and <country/regioncode2> is an uppercase two-letter code derived from ISO 3166. Some culture names have prefixes that specify the script; for example, "Cy" specifies the Cyrillic script, and "Lt" specifies the Latin script. For more information, see . Table of Language Culture Names, Culture Codes, and ISO Values. - strLang[Visual Basic]
A String that that contains the culture name. The culture name follows the RFC 1766 standard in the format "<languagecode2>-<country/regioncode2>" where <languagecode2> is a lowercase two-letter code derived from ISO 639-1 and <country/regioncode2> is an uppercase two-letter code derived from ISO 3166. Some culture names have prefixes that specify the script; for example, "Cy" specifies the Cyrillic script, and "Lt" specifies the Latin script. For more information, see . Table of Language Culture Names, Culture Codes, and ISO Values.
Return Values
[C++] This method returns an HRESULT indicating whether it completed successfully. See the Error Values section for more details.
[Visual Basic] None.
Error Values
[C++] This method returns S_OK (0x00000000) to indicate success and standard COM HRESULT error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. 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.
[Visual Basic] This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to standard COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.
The following table describes the custom COM errors this method can return.
Name | Value | Description |
---|---|---|
E_CAT_CATMGR_NOT_INITIALIZED | [C++] 0x889800B5 [Visual Basic] &H889800B5 |
The CatalogManager object has not been initialized. The CatalogManager object should be initialized before calling this method. |
E_CAT_INVALID_DATE | [C++] 0x889800C3 [Visual Basic] &H889800C3 |
There was an error converting the date specified. Please specify a valid date. |
E_CAT_INVALID_XML_FORMAT | [C++] 0x889800D9 [Visual Basic] &H889800D9 |
The XML format that you specified is invalid. |
E_CAT_FILE_CREATION_FAILED | [C++] 0x88980018 [Visual Basic] &H88980018 |
The Catalog Export operation was unable to create the file you specified. Check that the file name you specified is valid and the directory that you specified exists and is not read-only. |
E_CAT_IMPORT_IN_PROGRESS | [C++] 0x88980025 [Visual Basic] &H88980025 |
This operation cannot be started because an import operation is currently in progress. |
Remarks
If the strCatalogsToExport parameter is missing or contains an empty string, then all catalogs that have been changed since the specified time stamp are exported. Otherwise the strCatalogsToExport parameter is a comma-separated list of catalog names to be exported.
If the vrTimeStamp parameter is missing or contains an empty string, then the complete catalog or catalogs are exported.
If the strLang parameter is not specified then the default system language of the Web server will be used for multilingual properties.
The following table shows the values in the CatalogXMLFmtEnum enumeration, their associated names, and describes their use.
Name | Value | Description |
---|---|---|
cscFmtElementCentric | 0 | Export in Commerce Server 2000 format. (Default) |
cscFmtAttributeCentric | 1 | Export in Commerce Server 2002 format. |
cscFmtXDR | 2 | Export the Commerce Server 2002 schema as XDR. (No data) |
This method runs in a separate thread. Prior to spawning the thread, it checks that there is not an existing ImportCSV or ImportXML method in progress. After the new thread is spawned, this method returns immediately, if the parameter 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.
Some characters are not valid in an XML attribute name. When a catalog is exported in the attribute-centric mode these characters are encoded in the form _xHHHH_ where HHHH is the hex value of the character. The following characters are encoded:
- Back slash (\)
- Forward slash (/)
- Ampersand (&)
- Left angle bracket (<)
- Right angle bracket (>)
- All characters in the range 0xF900 to 0xFFFE
Caution
- If you call this method on a virtual catalog the resulting XML data will not include changes that are caused by changes in inclusion or exclusion rules. It will include changes inherited from a base catalog.
- If you call this method from Visual Basic Scripting Edition (VBScript) with the fRunSynchronously parameter set to False, VBScript will unload the object as soon as the script ends. If the script ends before the spawned thread finishes exporting the catalog, it will be terminated prematurely and the catalog will not be exported successfully.
If there is a temporary loss of the SQL Server connection, longer than two minutes, an import or export will be stopped. Other methods should work after the interruption.
For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.
[Visual Basic]
Example
myCatalogManager.DeltaExportXML("C:\MyXMLFile.xml", "2/27/01", "Clothes, Shoes", False, "ENU", cscFmtAttributeCentric)
See Also
[Visual Basic]CatalogManager Object
[C++]ICatalogManager3::ExportXML
[Visual Basic]CatalogManager.ExportXML
[C++]Table of Language Culture Names, Codes, and ISO Values
[Visual Basic]Table of Language Culture Names, Codes, and ISO Values
Copyright © 2005 Microsoft Corporation.
All rights reserved.