ExecuteSQLTask::SqlStatementSource Property
Gets or sets the name of the source that contains the SQL statement that the Execute SQL task runs.
Assembly: Microsoft.SqlServer.SQLTask (in Microsoft.SqlServer.SQLTask.dll)
public: property String^ SqlStatementSource { virtual String^ get() sealed; virtual void set(String^ value) sealed; }
Property Value
Type: System::String^A String that indicates the name of the source that contains the SQL statement that the Execute SQL task runs.
Implements
IDTSExecuteSQL::SqlStatementSourceThe source string can be the SQL statement itself, a connection manager to a file that has the SQL statement, or the name of a variable that contains the SQL statement, depending on the setting of the SqlStatementSourceType enumeration.
The following example creates an ExecuteSQLTask, then shows the default settings of the properties, including the SqlStatementSource, using the TaskHost. It then sets the value the SqlStatementSource in addition to some properties to show how to set property values.
Sample Output:
BypassPrepare False
CodePage 1252
Connection
ExecutionValue
IsStoredProcedure False
ParameterBindings Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.ParameterBindings
ResultSetBindings Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.ResultBindings
ResultSetType 1
SqlStatementSource
SqlStatementSourceType 1
TimeOut 0
--------------------------
New value of Source and SourceType: myVar, 3
New value of ResultSetType: 4