Login.HasAccess Property

Gets or sets the Boolean property value that specifies whether the SQL Server login account has access to the instance of SQL Server.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Syntax

'Declaration
<SfcPropertyAttribute(SfcPropertyFlags.Standalone, "true")> _
Public ReadOnly Property HasAccess As Boolean
    Get
'Usage
Dim instance As Login
Dim value As Boolean

value = instance.HasAccess
[SfcPropertyAttribute(SfcPropertyFlags.Standalone, "true")]
public bool HasAccess { get; }
[SfcPropertyAttribute(SfcPropertyFlags::Standalone, L"true")]
public:
property bool HasAccess {
    bool get ();
}
[<SfcPropertyAttribute(SfcPropertyFlags.Standalone, "true")>]
member HasAccess : bool
function get HasAccess () : boolean

Property Value

Type: System.Boolean
A Boolean value that specifies whether the login account has access to the instance of SQL Server.
If True, the login has access to the instance of SQL Server.
If False (default), the login does not have access to the instance of SQL Server.