ISqlSession.ExecuteScript method (String)
Executes a series of Transact-SQL queries from a text file based on the specified path.
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Sub ExecuteScript ( _
path As String _
)
'Usage
Dim instance As ISqlSession
Dim path As String
instance.ExecuteScript(path)
void ExecuteScript(
string path
)
Parameters
path
Type: System.StringA string that contains the fully qualified path to the text file.
Exceptions
Exception | Condition |
---|---|
Exception | Failed to execute the command. |
Remarks
Each query in the text file must be delimited by the word GO on a separate line.
The default command time-out is set to infinite.