Share via


GetCatalogs Method (String)

Returns a CatalogsDataSet containing all the catalogs matching the searchClause in the Catalog System and their associated information.

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

Syntax

'Declaration
Public Function GetCatalogs ( _
    searchClause As String _
) As CatalogsDataSet
'Usage
Dim instance As CatalogContext
Dim searchClause As String
Dim returnValue As CatalogsDataSet

returnValue = instance.GetCatalogs(searchClause)
public CatalogsDataSet GetCatalogs(
    string searchClause
)
public:
CatalogsDataSet^ GetCatalogs(
    String^ searchClause
)
public function GetCatalogs(
    searchClause : String
) : CatalogsDataSet

Parameters

  • searchClause
    Type: System..::.String
    The criteria, the search clause to filter the catalogs.

Return Value

Type: Microsoft.CommerceServer.Catalog..::.CatalogsDataSet
Returns a CatalogsDataSet containing all the catalogs matching the searchClause in the Catalog System and their associated information. The returned DataSet contains display names in all languages as columns with names formatted as <DisplayName>_<LANGUAGE>. To access the language-specific display name, you need to access that column. When using a catalog object in your code, the column corresponds to the DisplayName field, which has an ActiveLanguage field.

Remarks

The display names for the catalogs in the CatalogsDataSet will be in the CurrentUICulture of the catalog server. The CatalogsDataSet will contain a column named LanguageExistsInCatalog which will contain 0 if the language does not exist in the catalog and 1 if the language exists in the catalog. The CatalogsDataSet will be sorted by the DisplayName and catalogs having the same display name will be sorted by the catalog name. If searchClause is nullNothingnullptra null reference (Nothing in Visual Basic) then this method returns all the catalogs in the catalog system. Any columns used in the searchClause should be surrounded by square brackets. Any string values referenced in the searchClause should be prefixed by N to allow searching unicode data. example string searchClause = @"\[CatalogName\] LIKE N'%CatalogName%'"; You can also specify multiple conditions in the searchClause by using valid SQL operators. example string searchClause = @"\[CatalogNameName\] LIKE N'%CatalogName%' OR \[DisplayName\] like N'%display%'";

Permissions

See Also

Reference

CatalogContext Class

CatalogContext Members

GetCatalogs Overload

Microsoft.CommerceServer.Catalog Namespace