ScriptingOptions Constructor
Initializes a new instance of the ScriptingOptions class.
Espacio de nombres: Microsoft.SqlServer.Management.Smo
Ensamblado: Microsoft.SqlServer.Smo (en Microsoft.SqlServer.Smo.dll)
Sintaxis
'Declaración
Public Sub New
'Uso
Dim instance As New ScriptingOptions()
public ScriptingOptions()
public:
ScriptingOptions()
new : unit -> ScriptingOptions
public function ScriptingOptions()
Comentarios
El constructor predeterminado inicializa los campos con sus valores predeterminados.
Ejemplos
The following code example creates a new instance of the ScriptingOptions class and uses it to configure a Scripter.
Visual Basic
Dim srv As Server
srv = New Server
Dim scriptingOptions As ScriptingOptions
scriptingOptions = New ScriptingOptions
scriptingOptions.ScriptDrops = false
scriptingOptions.WithDependencies = true
Dim scrp As Scripter
scrp = New Scripter(srv)
scrp.Options = scriptingOptions
PowerShell
$srv = New-Object Microsoft.SqlServer.Management.Smo.Server("(local)")
$scriptingOptions = New-Object Microsoft.SqlServer.Management.Smo.ScriptingOptions
$scriptingOptions.ScriptDrops = $FALSE
$scriptingOptions.WithDependencies = $TRUE
$scrp = New-Object Microsoft.SqlServer.Management.Smo.Scripter($srv)
$scrp.Options = $scriptingOptions
Vea también
Referencia
Sobrecarga de ScriptingOptions
Espacio de nombres Microsoft.SqlServer.Management.Smo