ListMembers Method (SQLServer) (SQL-DMO)

The ListMembers method returns a NameList object enumerating the Microsoft® SQL Server™ server or database roles in which the SQLServer object login has membership.

Applies To

SQLServer Object

Syntax

object.ListMembers( Type ) as NameList

Part Description
object Expression that evaluates to an object in the Applies To list
Type Long integer identifying a SQL Server role type constricting NameList membership as described in Settings

Settings

Use the values enumerated below when setting the Type argument.

Constant Value Description
SQLDMORole_All 3 List server and database roles in which the connected login is a member
SQLDMORole_Database 2 List database roles in which the connected login is a member
SQLDMORole_Server 1 List server roles in which the connected login is a member

Returns

A NameList object enumerating system and user-defined security roles.

Prototype (C/C++)

HRESULT ListMembers(
SQLDMO_ROLE_TYPE Type,
LPSQLDMONAMELIST* ppList);

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.