Share via


DatabaseMapping.DBName Property

Gets the name of the database in which the login is mapped to the database user.

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

Syntax

'Declaration
<SfcPropertyAttribute(SfcPropertyFlags.Standalone)> _
Public ReadOnly Property DBName As String 
    Get
'Usage
Dim instance As DatabaseMapping 
Dim value As String 

value = instance.DBName
[SfcPropertyAttribute(SfcPropertyFlags.Standalone)]
public string DBName { get; }
[SfcPropertyAttribute(SfcPropertyFlags::Standalone)]
public:
property String^ DBName {
    String^ get ();
}
[<SfcPropertyAttribute(SfcPropertyFlags.Standalone)>]
member DBName : string
function get DBName () : String

Property Value

Type: System.String
A String value that specifies the name of the database.

Examples

Managing Users, Roles, and Logins

See Also

Reference

DatabaseMapping Class

Microsoft.SqlServer.Management.Smo Namespace

Other Resources

Principals (Database Engine)