Share via


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)

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

  • commandTimeout
    Type: System.Int32

    The 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.

See also

Reference

ISqlSession interface

ISqlSession members

ExecuteScript overload

Microsoft.SharePoint.Utilities namespace