GetCatalogs Method (String, String, CatalogSearchOptions)
For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.
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, _
language As String, _
searchOptions As CatalogSearchOptions _
) As CatalogsDataSet
'Usage
Dim instance As CatalogContext
Dim searchClause As String
Dim language As String
Dim searchOptions As CatalogSearchOptions
Dim returnValue As CatalogsDataSet
returnValue = instance.GetCatalogs(searchClause, _
language, searchOptions)
public CatalogsDataSet GetCatalogs(
string searchClause,
string language,
CatalogSearchOptions searchOptions
)
public:
CatalogsDataSet^ GetCatalogs(
String^ searchClause,
String^ language,
CatalogSearchOptions^ searchOptions
)
public function GetCatalogs(
searchClause : String,
language : String,
searchOptions : CatalogSearchOptions
) : CatalogsDataSet
Parameters
- searchClause
Type: System..::.String
The search clause to filter the catalogs.
- language
Type: System..::.String
The culture code indicating the language that is associated with the Catalog.
- searchOptions
Type: Microsoft.CommerceServer.Catalog..::.CatalogSearchOptions
The CatalogSearchOptions object. May be nullNothingnullptra null reference (Nothing in Visual Basic).
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 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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.