AliasName Method

SQLServer.Login Object

Description

Returns the alias username that a login is associated with for a specific database.

Visual Basic

idAlias = Login.AliasName ( [DatabaseName :=] idDatabase )

C++

HRESULT pLogin->GetAliasName (
SQLOLE_LPCSTR
idDatabase,
SQLOLE_LPBSTR pidAlias );

Elements

Element Type Description

idAlias Identifier Returned alias username
idDatabase Identifier Database to retrieve alias username from

Remarks

This is an indexed property.

Reference

sp_addalias