Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ScriptingOptions.FileName Property

 

Applies To: SQL Server 2016 Preview

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)

public string FileName { get; set; }

Property Value

Type: System.String

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

Legacy Code Example

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"
Return to top
Show:
© 2015 Microsoft