SqlScriptGenerator.GenerateScript 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| GenerateScript(TSqlFragment, TextWriter) |
生成表示指定脚本片段的文本 |
| GenerateScript(TSqlFragment, String) |
使用 scriptFragment 填充编写器。 |
| GenerateScript(TSqlFragment, String, IList<ParseError>) |
使用 scriptFragment 填充编写器。 |
GenerateScript(TSqlFragment, TextWriter)
生成表示指定脚本片段的文本
public void GenerateScript(Microsoft.SqlServer.TransactSql.ScriptDom.TSqlFragment scriptFragment, System.IO.TextWriter writer);
member this.GenerateScript : Microsoft.SqlServer.TransactSql.ScriptDom.TSqlFragment * System.IO.TextWriter -> unit
Public Sub GenerateScript (scriptFragment As TSqlFragment, writer As TextWriter)
参数
- scriptFragment
- TSqlFragment
要为其生成令牌的脚本片段
- writer
- TextWriter
要向其写入文本的文本编写器
适用于
GenerateScript(TSqlFragment, String)
使用 scriptFragment 填充编写器。
public void GenerateScript(Microsoft.SqlServer.TransactSql.ScriptDom.TSqlFragment scriptFragment, out string script);
member this.GenerateScript : Microsoft.SqlServer.TransactSql.ScriptDom.TSqlFragment * string -> unit
Public Sub GenerateScript (scriptFragment As TSqlFragment, ByRef script As String)
参数
- scriptFragment
- TSqlFragment
要为其生成脚本的脚本片段。
- script
- String
生成的脚本。
适用于
GenerateScript(TSqlFragment, String, IList<ParseError>)
使用 scriptFragment 填充编写器。
public void GenerateScript(Microsoft.SqlServer.TransactSql.ScriptDom.TSqlFragment scriptFragment, out string script, out System.Collections.Generic.IList<Microsoft.SqlServer.TransactSql.ScriptDom.ParseError> versioningErrors);
member this.GenerateScript : Microsoft.SqlServer.TransactSql.ScriptDom.TSqlFragment * string * IList -> unit
Public Sub GenerateScript (scriptFragment As TSqlFragment, ByRef script As String, ByRef versioningErrors As IList(Of ParseError))
参数
- scriptFragment
- TSqlFragment
要为其生成脚本的脚本片段。
- script
- String
生成的脚本。
- versioningErrors
- IList<ParseError>
特定于引擎类型的错误列表。