The EnumLoginMappings method returns a QueryResults object containing multiple result sets, where each result set enumerates a Microsoft® SQL Server™ login and the database user(s) to which the login is mapped.
Database Object | SQLServer Object |
object.EnumLoginMappings() as QueryResults
Part | Description |
---|---|
object | Expression that evaluates to an object in the Applies To list |
A QueryResults object containing multiple result sets each defined by these columns.
Column | Data type | Description |
---|---|---|
LoginName | nvarchar(129) | Name of a SQL Server login |
DBName | nvarchar(129) | If applicable, a database containing a user mapping the login |
UserName | nvarchar(129) | If applicable, the database user to which the login is mapped |
AliasName | nvarchar(129) | Reserved for future use |
HRESULT EnumLoginMappings(
LPSQLDMOQUERYRESULTS* ppResults);