ExecuteSQLTask Class

Definition

Contains the members used to configure and run an Execute SQL task. The Execute SQL task is used to execute SQL commands against a relational database table or view.

public ref class ExecuteSQLTask : Microsoft::SqlServer::Dts::Runtime::Task, Microsoft::SqlServer::Dts::Runtime::IDTSComponentPersist, Microsoft::SqlServer::Dts::Tasks::ExecuteSQLTask::IDTSExecuteSQL
[Microsoft.SqlServer.Dts.Runtime.DtsTask(HelpKeyword="sql13.dts.designer.executesqltask.F1", LocalizationType=typeof(Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.Localized), RequiredProductLevel=Microsoft.SqlServer.Dts.Runtime.DTSProductLevel.None, SamplesTag="SsisExecuteSqlTask", TaskContact="Execute SQL Task; Microsoft Corporation; SQL Server 2016; © 2015 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1", TaskType="DTS90", UITypeName="Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.SQLTaskUI, Microsoft.SqlServer.SQLTaskUI, Version=13.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91")]
[System.Runtime.InteropServices.Guid("EBC1FA93-45A9-444F-BBDC-B4F5265863C3")]
public class ExecuteSQLTask : Microsoft.SqlServer.Dts.Runtime.Task, Microsoft.SqlServer.Dts.Runtime.IDTSComponentPersist, Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.IDTSExecuteSQL
[Microsoft.SqlServer.Dts.Runtime.DtsTask(HelpKeyword="sql13.dts.designer.executesqltask.F1", LocalizationType=typeof(Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.Localized), RequiredProductLevel=Microsoft.SqlServer.Dts.Runtime.DTSProductLevel.None, SamplesTag="SsisExecuteSqlTask", TaskContact="Execute SQL Task; Microsoft Corporation; SQL Server 2017; © 2017 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1", TaskType="DTS90", UITypeName="Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.SQLTaskUI, Microsoft.SqlServer.SQLTaskUI, Version=14.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91")]
[System.Runtime.InteropServices.Guid("855117DC-EA42-4532-8D53-8E4FC09662CE")]
public class ExecuteSQLTask : Microsoft.SqlServer.Dts.Runtime.Task, Microsoft.SqlServer.Dts.Runtime.IDTSComponentPersist, Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.IDTSExecuteSQL
[Microsoft.SqlServer.Dts.Runtime.DtsTask(HelpKeyword="sql13.dts.designer.executesqltask.F1", LocalizationType=typeof(Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.Localized), RequiredProductLevel=Microsoft.SqlServer.Dts.Runtime.DTSProductLevel.None, SamplesTag="SsisExecuteSqlTask", TaskContact="Execute SQL Task; Microsoft Corporation; SQL Server 2019; © 2019 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1", TaskType="DTS90", UITypeName="Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.SQLTaskUI, Microsoft.SqlServer.SQLTaskUI, Version=15.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91")]
[System.Runtime.InteropServices.Guid("736DDEB9-5DA1-4841-B5A7-F08CC574307F")]
public class ExecuteSQLTask : Microsoft.SqlServer.Dts.Runtime.Task, Microsoft.SqlServer.Dts.Runtime.IDTSComponentPersist, Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.IDTSExecuteSQL
[<Microsoft.SqlServer.Dts.Runtime.DtsTask(HelpKeyword="sql13.dts.designer.executesqltask.F1", LocalizationType=typeof(Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.Localized), RequiredProductLevel=Microsoft.SqlServer.Dts.Runtime.DTSProductLevel.None, SamplesTag="SsisExecuteSqlTask", TaskContact="Execute SQL Task; Microsoft Corporation; SQL Server 2016; © 2015 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1", TaskType="DTS90", UITypeName="Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.SQLTaskUI, Microsoft.SqlServer.SQLTaskUI, Version=13.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91")>]
[<System.Runtime.InteropServices.Guid("EBC1FA93-45A9-444F-BBDC-B4F5265863C3")>]
type ExecuteSQLTask = class
    inherit Task
    interface IDTSExecuteSQL
    interface IDTSComponentPersist
[<Microsoft.SqlServer.Dts.Runtime.DtsTask(HelpKeyword="sql13.dts.designer.executesqltask.F1", LocalizationType=typeof(Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.Localized), RequiredProductLevel=Microsoft.SqlServer.Dts.Runtime.DTSProductLevel.None, SamplesTag="SsisExecuteSqlTask", TaskContact="Execute SQL Task; Microsoft Corporation; SQL Server 2017; © 2017 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1", TaskType="DTS90", UITypeName="Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.SQLTaskUI, Microsoft.SqlServer.SQLTaskUI, Version=14.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91")>]
[<System.Runtime.InteropServices.Guid("855117DC-EA42-4532-8D53-8E4FC09662CE")>]
type ExecuteSQLTask = class
    inherit Task
    interface IDTSExecuteSQL
    interface IDTSComponentPersist
[<Microsoft.SqlServer.Dts.Runtime.DtsTask(HelpKeyword="sql13.dts.designer.executesqltask.F1", LocalizationType=typeof(Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.Localized), RequiredProductLevel=Microsoft.SqlServer.Dts.Runtime.DTSProductLevel.None, SamplesTag="SsisExecuteSqlTask", TaskContact="Execute SQL Task; Microsoft Corporation; SQL Server 2019; © 2019 Microsoft Corporation; All Rights Reserved;http://www.microsoft.com/sql/support/default.asp;1", TaskType="DTS90", UITypeName="Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.SQLTaskUI, Microsoft.SqlServer.SQLTaskUI, Version=15.0.0.0, Culture=Neutral, PublicKeyToken=89845dcd8080cc91")>]
[<System.Runtime.InteropServices.Guid("736DDEB9-5DA1-4841-B5A7-F08CC574307F")>]
type ExecuteSQLTask = class
    inherit Task
    interface IDTSExecuteSQL
    interface IDTSComponentPersist
Public Class ExecuteSQLTask
Inherits Task
Implements IDTSComponentPersist, IDTSExecuteSQL
Inheritance
ExecuteSQLTask
Derived
Attributes
Implements

Remarks

For more information about the features of this task, see Execute SQL Task.

Constructors

ExecuteSQLTask()

Initializes a new instance of the ExecuteSQLTask class.

Properties

BypassPrepare

Gets or sets a Boolean that indicates whether the Execute SQL task skips preparation of the statement when sending the SQL statement to the relational database management system (RDBMS).

CodePage

Gets or sets the code page to use when translating variable values that are stored as Unicode wide chars to multi-bytes. Translation occurs either when storing values to or extracting values from databases.

Connection

Gets or sets the name of the connection manager that connects to the relational database management system (RDBMS) where the Execute SQL task is run.

ExecutionValue

Returns the number of rows affected by the SQL statement or statements.

IsStoredProcedure

Gets or sets a Boolean that indicates whether the SQL statement specified by the Execute SQL task is a stored procedure.

ParameterBindings

Returns an object that implements IDTSParameterBindings.

ResultSetBindings

Returns an object that implements IDTSParameterBindings.

ResultSetType

Gets or sets a value that indicates the type of result set returned by the SQL statement that the Execute SQL tasks runs.

SqlStatementSource

Gets or sets the name of the source that contains the SQL statement that the Execute SQL task runs.

SqlStatementSourceType

Gets or sets a value that indicates the type of source that contains the SQL statement that the Execute SQL task runs.

TargetServerVersion (Inherited from Task)
TimeOut

Gets or sets an integer that indicates the maximum number of seconds the task can run before timing out.

TypeConversionMode

Gets or sets the conversion mode used by the Execute SQL Task.

Version

*** Member deprecated; see Remarks. ***   Returns the version of the task. This property is read-only.

(Inherited from Task)

Methods

CanUpdate(String)

*** Member deprecated; see Remarks. ***   A Boolean that indicates whether the new package XML can update the old package XML.

(Inherited from Task)
Equals(Object)

Determines whether two object instances are equal.

(Inherited from DtsObject)
Execute(Connections, VariableDispenser, IDTSComponentEvents, IDTSLogging, Object)

Runs the task.

GetConnectionID(Connections, String)

Gets a String containing the ID of the connection.

(Inherited from Task)
GetConnectionName(Connections, String)

Gets a String containing the name of the connection.

(Inherited from Task)
GetHashCode()

Returns the hash code for this instance.

(Inherited from DtsObject)
InitializeTask(Connections, VariableDispenser, IDTSInfoEvents, IDTSLogging, EventInfos, LogEntryInfos, ObjectReferenceTracker)

Initializes the properties associated with the Execute SQL task. This method is called by the runtime and is not used in code.

LoadFromXML(XmlElement, IDTSInfoEvents)

This method is not callable by your application code. To load a package saved as .xml, use the LoadPackage(String, IDTSEvents) method.

SaveToXML(XmlDocument, IDTSInfoEvents)

This method is not callable by your application code. To save a package as .xml, use the SaveToXml(String, Package, IDTSEvents) method.

Update(String)

*** Member deprecated; see Remarks. ***   This method updates the old package XML with the new package XML if CanUpdate(String) is set to true.

(Inherited from Task)
Validate(Connections, VariableDispenser, IDTSComponentEvents, IDTSLogging)

Verifies that the task is properly configured.

Applies to