Task.Validate メソッド

定義

コンポーネントが正しく構成されていることを確認します。

public:
 virtual Microsoft::SqlServer::Dts::Runtime::DTSExecResult Validate(Microsoft::SqlServer::Dts::Runtime::Connections ^ connections, Microsoft::SqlServer::Dts::Runtime::VariableDispenser ^ variableDispenser, Microsoft::SqlServer::Dts::Runtime::IDTSComponentEvents ^ componentEvents, Microsoft::SqlServer::Dts::Runtime::IDTSLogging ^ log);
public virtual Microsoft.SqlServer.Dts.Runtime.DTSExecResult Validate (Microsoft.SqlServer.Dts.Runtime.Connections connections, Microsoft.SqlServer.Dts.Runtime.VariableDispenser variableDispenser, Microsoft.SqlServer.Dts.Runtime.IDTSComponentEvents componentEvents, Microsoft.SqlServer.Dts.Runtime.IDTSLogging log);
abstract member Validate : Microsoft.SqlServer.Dts.Runtime.Connections * Microsoft.SqlServer.Dts.Runtime.VariableDispenser * Microsoft.SqlServer.Dts.Runtime.IDTSComponentEvents * Microsoft.SqlServer.Dts.Runtime.IDTSLogging -> Microsoft.SqlServer.Dts.Runtime.DTSExecResult
override this.Validate : Microsoft.SqlServer.Dts.Runtime.Connections * Microsoft.SqlServer.Dts.Runtime.VariableDispenser * Microsoft.SqlServer.Dts.Runtime.IDTSComponentEvents * Microsoft.SqlServer.Dts.Runtime.IDTSLogging -> Microsoft.SqlServer.Dts.Runtime.DTSExecResult
Public Overridable Function Validate (connections As Connections, variableDispenser As VariableDispenser, componentEvents As IDTSComponentEvents, log As IDTSLogging) As DTSExecResult

パラメーター

connections
Connections

タスクで使用される接続のコレクションです。

variableDispenser
VariableDispenser

変数をロックするための VariableDispenser オブジェクトです。

componentEvents
IDTSComponentEvents

IDTSComponentEvents インターフェイスを実装するオブジェクト。

log
IDTSLogging

IDTSLogging インターフェイスを実装するオブジェクト。

戻り値

DTSExecResult 列挙体の値。

Package オブジェクトの Validate メソッドを使用してオブジェクトを検証するコード例を次に示します。

DTSExecResult myresult = pkg.Validate(myPkgConnections, myPkgVariables, myIDTSEvents, myIDTSLogging);  
Dim myresult As DTSExecResult =  pkg.Validate(myPkgConnections,myPkgVariables,myIDTSEvents, myIDTSLogging)  

注釈

Validate メソッドは、不正確または不適切な設定がないかプロパティと設定を確認します。 このメソッドは、データを修正したり、接続を検証するためにデータ ソースに接続することはありません。 ただし、必要なフィールドにデータが設定され、適切な値が含まれているかどうかを確認します。 検証されるフィールドは、検証するオブジェクトの種類によって異なります。

Validate は主に、カスタム タスクを作成する際に使用します。 Validate メソッドは、タスクをデザイン画面上にドロップしたときに SSIS デザイナーによって呼び出されます。また、その後でプロパティを設定する際にも毎回呼び出されます。 ただし、コードで、個々のオブジェクトで Validate メソッドを使用するのは一般的ではありません。オブジェクトを検証する必要がある場合は、PackageValidate メソッドを呼び出すことをお勧めします。 ただし、このメソッドを必要とする特定の状況においては、個々のオブジェクトでこのメソッドを使用できます。

Validate メソッドは、SSIS デザイナーで使用される場合にはオブジェクトの検証のために、またはコードで呼び出された場合に、カスタム タスクでオーバーライドされます。 カスタム タスクのメソッドの Validate 記述の詳細については、「カスタム タスク のコーディング」を参照してください。

適用対象