ExecutePackageTaskClass クラスの新しいインスタンスを初期化します。
名前空間: Microsoft.SqlServer.Dts.Tasks.ExecutePackageTask
アセンブリ: Microsoft.SqlServer.ExecPackageTaskWrap (Microsoft.SqlServer.ExecPackageTaskWrap.dll)
構文
'宣言
Public Sub New
'使用
Dim instance As New ExecutePackageTaskClass()
public ExecutePackageTaskClass()
public:
ExecutePackageTaskClass()
new : unit -> ExecutePackageTaskClass
public function ExecutePackageTaskClass()
説明
タスク コンストラクターを呼び出すコード サンプルを次に示します。 ただし、ほとんどの場合、パッケージのメンバーとしてタスクを作成することになります。
Package pkg = new Package();
Executable exec1 = pkg.Executables.Add("STOCK:ExecutePackageTask");
TaskHost th = exec1 as TaskHost;
// You can cast the InnerObject of the TaskHost
// to the specific class.
// For the code samples, the task properties are accessed using
// the Properties of the TaskHost.
// ExecutePackageTask myTask = th.InnerObject as ExecutePackageTask;
Dim pkg As Package = New Package()
Dim exec1 As Executable = pkg.Executables.Add("STOCK:ExecutePackageTask")
Dim th As TaskHost = exec1 as TaskHost
' You can cast the InnerObject of the TaskHost
' to the specific class.
' For the code samples, the task properties are accessed using
' the Properties of the TaskHost.
' Dim myTask As ExecutePackageTask = th.InnerObject as ExecutePackageTask
ExecutePackageTask のプロパティとメソッドは、TaskHost 変数の th を使用して利用できます。
使用例
次のコード サンプルでは、コンストラクターを使用して新しい ExecutePackageTask を作成します。
ExecutePackageTask myTask = new ExecutePackageTask();
Dim myTask As ExecutePackageTask = New ExecutePackageTask()