ICatalogManager3::DeleteCatalog Method [C++]
Use this method to delete a catalog from the Product Catalog System.
Definition
[C++]
HRESULT ICatalogManager3::DeleteCatalog(BSTRstrCatalogName);
[Visual Basic]
Sub DeleteCatalog(strCatalogName As String)
Parameters
- strCatalogName[C++]
[in] A BSTR that contains the name of the catalog to be deleted. - strCatalogName[Visual Basic]
A String that contains the name of the catalog to be deleted.
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 either standard or custom COM HRESULT error values to indicate failure. For more information about standard COM errors, see Standard COM Errors.
[Visual Basic] This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to either standard or custom COM 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_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_CATALOGNAME | [C++] 0x88980063 [Visual Basic] &H88980063 |
The Catalog Name you specified is invalid. Catalog names cannot be blank |
E_CAT_INVALID_CATALOG_NAME_LENGTH | [C++] 0x88980042 [Visual Basic] &H88980042 |
The Catalog name you specified exceeds the maximum limit of 85 characters. |
E_CAT_CHARACTER_NOT_ALLOWED | [C++] 0x8898003D [Visual Basic] &H8898003D |
The catalog name you specified has one of the nine reserved characters: " [ ] , ' ( )#. You should not use these reserved characters. |
E_CAT_CATALOG_EXPORT_IN_PROGRESS | [C++] 0x88980058 [Visual Basic] &H88980058 |
The catalog you specified is currently being exported or imported. This catalog or its associated languages cannot be deleted. |
[C++] 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] Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.
Remarks
This method cannot be called in a transacted object. This method involves the creation, deletion, or updating of free text indexes. SQL Server does not allow these operations in a transaction.
For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.
[Visual Basic]
Example
myCatalogManager.DeleteCatalog "OurStore"
See Also
[Visual Basic]CatalogManager Object
[C++]ICatalogManager3::CreateCatalog
[Visual Basic]CatalogManager.CreateCatalog
Copyright © 2005 Microsoft Corporation.
All rights reserved.