Export (0) Print
Expand All

ScriptingOptions.Add Method (ScriptOption)

Adds a ScriptOption object to the ScriptingOptions object.

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

public ScriptingOptions Add(
	ScriptOption scriptOption
)

Parameters

scriptOption
Type: Microsoft.SqlServer.Management.Smo.ScriptOption
A ScriptOption object that is to be added to the ScriptingOptions object.

Return Value

Type: Microsoft.SqlServer.Management.Smo.ScriptingOptions
A ScriptingOptions object that contains the added ScriptOption object.

The following code example adds a new ScriptOption to the ScriptingOptions object.

Visual Basic

Dim scOps As New ScriptingOptions()
scOps.Add(ScriptOption.WithDependencies)

PowerShell

$scOps = New-Object Microsoft.SqlServer.Management.Smo.ScriptingOptions
$scOps.Add([Microsoft.SqlServer.Management.Smo.ScriptOption]::WithDependencies)
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft