Returns the user that a login is associated with for a specific database.
idUser = Login.UserName ( [DatabaseName :=] idDatabase )
HRESULT pLogin->GetUserName (
SQLOLE_LPCSTR idDatabase,
SQLOLE_LPBSTR pidUser );
Element | Type | Description |
---|
idUser | Identifier | Returned username |
idDatabase | Identifier | Database to retrieve username from |
This is an indexed property.
sp_adduser