Udostępnij za pośrednictwem


Właściwość ScriptingOptions.WithDependencies

Pobiera lub ustawia Boolean wartości właściwość, która określa, czy zawiera wszystkie obiekty zależne w wygenerowanym script.

Przestrzeń nazw:  Microsoft.SqlServer.Management.Smo
Zestaw:  Microsoft.SqlServer.Smo (w Microsoft.SqlServer.Smo.dll)

Składnia

'Deklaracja
Public Property WithDependencies As Boolean
    Get
    Set
'Użycie
Dim instance As ScriptingOptions
Dim value As Boolean

value = instance.WithDependencies

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

Wartość właściwości

Typ: System.Boolean
A Boolean wartość, która określa, czy zawiera wszystkie obiekty zależne w wygenerowanym script.
Jeśli True, wszystkich obiektów zależnych znajdują się w skrypcie.W przeciwnym razie False (domyślnie).

Przykłady

Poniższy przykład kodu Określa, że obiekty zależne będą inicjowane przez skrypty

Visual Basic

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

PowerShell

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