CatalogSets.GetCatalogsForUser Method (PIA)
Use this method to return the list of catalogs that have been assigned to a particular user through the catalog set specified in their profile.
Definition
[Visual Basic .NET]
Imports Microsoft.CommerceServer.Interop.Catalog
Imports ADODB26Lib ‘ for _Recordset
…
Public Function GetCatalogsForUser(objProfileService As Object,
user_id As String,
defaultCatalogSetID As String) As _Recordset
[C#]
using Microsoft.CommerceServer.Interop.Catalog;
using ADODB26Lib; //For _Recordset
…
public _Recordset GetCatalogsForUser(objectobjProfileService,
stringuser_id,
stringdefaultCatalogSetID);
Parameters
[Visual Basic .NET]
- objProfileService
A profile service object. - user_id
A String that contains the user ID. - defaultCatalogSetID
A String that contains the default catalog set ID.
[C#]
- objProfileService
A profile service object - user_id
A string that contains the user ID. - defaultCatalogSetID
A string that contains the default catalog set ID.
Return Values
[Visual Basic .NET] If this method completes successfully, it returns the _Recordset interface of a Recordset object that contains the list of catalogs.
[C#] This method returns an ADODB26Lib._Recordset interface to a Recordset object that will contain the list of catalogs.
Exceptions
This method may throw one of many mapped exceptions or an exception of type COMException. See Standard COM Errors for additional details.
Remarks
This method returns a Recordset object with a row for each catalog in the catalog set associated with the user profile in the user_id parameter and the following fields:
Field | Type | Description |
---|---|---|
CatalogName From the CatalogSet_Catalogs table. |
String maximum of 255 characters |
None |
CatalogName From the CatalogGlobal table. |
String maximum of 128 characters |
None |
If the user profile object passed to this method has not been initialized, the object will return the default catalog set.
[Visual Basic .NET]
Example
objProfileService = New ProfileService()
objProfileService.Initialize( _
sProfileServiceConnectionString, "Profile Definitions")
rsCatalogSet = myCatalogSets.GetCatalogsForUser( _
objProfileService, user_id, defaultCatalogSetID)
Requirements
Namespace: Microsoft.CommerceServer.Interop.Catalog
Platforms: Windows 2000, Windows Server 2003
Assembly: cs_ctlgsets (in cs_ctlgsets.dll)
See Also
Copyright © 2005 Microsoft Corporation.
All rights reserved.