共用方式為


ScriptingOptions.IncludeDatabaseRoleMemberships 屬性

Gets or sets a value that indicates whether the database role memberships are included.

命名空間:  Microsoft.SqlServer.Management.Smo
組件:  Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)

語法

'宣告
Public Property IncludeDatabaseRoleMemberships As Boolean 
    Get 
    Set
'用途
Dim instance As ScriptingOptions 
Dim value As Boolean 

value = instance.IncludeDatabaseRoleMemberships

instance.IncludeDatabaseRoleMemberships = value
public bool IncludeDatabaseRoleMemberships { get; set; }
public:
property bool IncludeDatabaseRoleMemberships {
    bool get ();
    void set (bool value);
}
member IncludeDatabaseRoleMemberships : bool with get, set
function get IncludeDatabaseRoleMemberships () : boolean 
function set IncludeDatabaseRoleMemberships (value : boolean)

屬性值

型別:System.Boolean
True if the database role memberships are included; otherwise, false.

範例

Visual Basic

Dim scOps As New ScriptingOptions()
scOps.IncludeDatabaseRoleMemberships = true

PowerShell

$scOps = New-Object Microsoft.SqlServer.Management.Smo.ScriptingOptions
$scOps.IncludeDatabaseRoleMemberships = $TRUE

請參閱

參考

ScriptingOptions 類別

Microsoft.SqlServer.Management.Smo 命名空間

其他資源

指令碼