The EnumDatabaseMappings method returns a QueryResults object enumerating the databases in which a username represents the referenced login.
object.EnumDatabaseMappings() as QueryResults
| Part | Description |
|---|---|
| object | Expression that evaluates to an object in the Applies To list |
A QueryResults object containing one result set defined by these columns.
| Column | Data type | Description |
|---|---|---|
| LoginName | nvarchar(129) | Name of the login record enumerated (referenced by the Login object) |
| DBName | nvarchar(129) | Name of a database containing a user representing the login |
| UserName | nvarchar(129) | Name of the user record representing the login |
| AliasName | nvarchar(129) | Reserved |
HRESULT EnumDatabaseMappings(
LPSQLDMOQUERYRESULTS* ppResults);