ISqlSession.ExecuteScript Method (TextReader, Int32)
Executes a series of Transact-SQL queries from a text File.
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Sub ExecuteScript ( _
textReader As TextReader, _
commandTimeout As Integer _
)
'Usage
Dim instance As ISqlSession
Dim textReader As TextReader
Dim commandTimeout As Integer
instance.ExecuteScript(textReader, commandTimeout)
void ExecuteScript(
TextReader textReader,
int commandTimeout
)
Parameters
textReader
Type: System.IO.TextReaderThe fully qualified path of the text File.
commandTimeout
Type: System.Int32The time, in seconds, to wait for each command to execute.
Exceptions
Exception | Condition |
---|---|
Exception | Failed to execute the command. |
Remarks
Each query in the File must be delimited by the word GO on a separate line.