Delen via


GetCatalogs Method (String, String, CatalogSearchOptions, Int32)

Returns a CatalogsDataSet containing all the catalogs matching the searchClause in the Catalog System and their associated information. The total number of records matching the query are available.

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

Syntax

'Declaration
Public Function GetCatalogs ( _
    searchClause As String, _
    language As String, _
    searchOptions As CatalogSearchOptions, _
    <OutAttribute> ByRef totalRecords As Integer _
) As CatalogsDataSet
'Usage
Dim instance As CatalogContext
Dim searchClause As String
Dim language As String
Dim searchOptions As CatalogSearchOptions
Dim totalRecords As Integer
Dim returnValue As CatalogsDataSet

returnValue = instance.GetCatalogs(searchClause, _
    language, searchOptions, totalRecords)
public CatalogsDataSet GetCatalogs(
    string searchClause,
    string language,
    CatalogSearchOptions searchOptions,
    out int totalRecords
)
public:
CatalogsDataSet^ GetCatalogs(
    String^ searchClause, 
    String^ language, 
    CatalogSearchOptions^ searchOptions, 
    [OutAttribute] int% totalRecords
)
public function GetCatalogs(
    searchClause : String, 
    language : String, 
    searchOptions : CatalogSearchOptions, 
    totalRecords : int
) : CatalogsDataSet

Parameters

  • language
    Type: System..::.String
    The culture code indicating the language that is associated with the Catalog.
  • totalRecords
    Type: System..::.Int32%
    The total number of records matching the query.

Return Value

Type: Microsoft.CommerceServer.Catalog..::.CatalogsDataSet
A CatalogsDataSet containing all the catalogs matching the searchClause in the Catalog System and their associated information. The results are filtered as per the searchOptions.

Remarks

The language is specified as a RFC 1766 CultureInfo class name. If nullNothingnullptra null reference (Nothing in Visual Basic), the language defaults to the current user interface culture.

The display names for the catalogs in the CatalogsDataSet will be in the language specified by language. 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%'"; If the searchOptions is specified then the values set to the CatalogSearchOptions.StartingRecord and CatalogSearchOptions.RecordsToRetrieve properties will be used and the values set on other properties for searchOptions will be ignored.

Permissions

See Also

Reference

CatalogContext Class

CatalogContext Members

GetCatalogs Overload

Microsoft.CommerceServer.Catalog Namespace