Export (0) Print
Expand All
Expand Minimize

ScriptingOptions.FileName Property

Gets or sets the name of the file to which the generated script is output.

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

function get FileName () : String 
function set FileName (value : String)

Property Value

Type: String
A String value that specifies the name of the file to which the generated script is output.

The following code example sets the name of the scripts output file.

Visual Basic

Dim scOps As New ScriptingOptions()
scOps.FileName = "C:\Program Files\Microsoft SQL Server\100\DTS\ForEachEnumerators\SampleFileName.sql"

PowerShell

$scOps = New-Object Microsoft.SqlServer.Management.Smo.ScriptingOptions
$scOps.FileName = "C:\Program Files\Microsoft SQL Server\100\DTS\ForEachEnumerators\SampleFileName.sql"

Community Additions

ADD
Show:
© 2014 Microsoft