从文本文件执行一系列事务处理 SQL 查询。
命名空间: Microsoft.SharePoint.Utilities
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
Sub ExecuteScript ( _
textReader As TextReader, _
commandTimeout As Integer _
)
用法
Dim instance As ISqlSession
Dim textReader As TextReader
Dim commandTimeout As Integer
instance.ExecuteScript(textReader, commandTimeout)
void ExecuteScript(
TextReader textReader,
int commandTimeout
)
参数
textReader
类型:System.IO.TextReader文本文件完全限定的路径。
commandTimeout
类型:System.Int32时间以秒为单位,要等待的时间来执行每个命令。
异常
| 异常 | 条件 |
|---|---|
| Exception | 执行命令失败。 |
备注
在文件中的每个查询必须位于单独的一行字GO用分隔。