TransferErrorMessagesTask.Validate メソッド

定義

コンテナが実行を妨げる無効な設定が含まれているかどうかを判断できるようにします。

public:
 override Microsoft::SqlServer::Dts::Runtime::DTSExecResult Validate(Microsoft::SqlServer::Dts::Runtime::Connections ^ connections, Microsoft::SqlServer::Dts::Runtime::VariableDispenser ^ variableDispenser, Microsoft::SqlServer::Dts::Runtime::IDTSComponentEvents ^ events, Microsoft::SqlServer::Dts::Runtime::IDTSLogging ^ log);
public override Microsoft.SqlServer.Dts.Runtime.DTSExecResult Validate(Microsoft.SqlServer.Dts.Runtime.Connections connections, Microsoft.SqlServer.Dts.Runtime.VariableDispenser variableDispenser, Microsoft.SqlServer.Dts.Runtime.IDTSComponentEvents events, Microsoft.SqlServer.Dts.Runtime.IDTSLogging log);
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 Overrides Function Validate (connections As Connections, variableDispenser As VariableDispenser, events As IDTSComponentEvents, log As IDTSLogging) As DTSExecResult

パラメーター

connections
Connections

コンテナのコレクション Connections

variableDispenser
VariableDispenser

コンテナのコレクション Variables

events
IDTSComponentEvents

イベントを起こすための IDTSComponentEvents インターフェース。

log
IDTSLogging

IDTSLogging インターフェイスです。

返品

検証の結果を示す DTSExecResult 列挙。

以下のコード例は、ValidateオブジェクトのPackageメソッドを使ってオブジェクトを検証する方法を示しています。

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

注釈

Validateメソッドは、プロパティや設定の不正確さや誤った設定をレビューします。 この手法はデータに触れず、接続を検証するためにデータソースに接続しません。 しかし、必要なフィールドが入力され、適切な数値が含まれていることが保証されます。 検証されるフィールドは、検証対象のオブジェクトによって異なります。

Validateの主な用途はカスタムタスクを書く際です。 Validateメソッドは、タスクが設計面にドロップされた際にSSISデザイナーによって呼び出され、プロパティ設定時に複数回呼び出されることがあります。 しかし、コード上では個々のオブジェクトに対するValidateメソッドはあまり使われず、オブジェクトの検証が必要な場合はValidate上でPackageメソッドを呼び出すことが推奨されています。 ただし、必要に応じて個別の物体でこの方法が利用可能です。

Validateメソッドはカスタムタスクで上書きされ、SSISデザイナーでオブジェクトの検証やコード呼び出時に上書きされます。 カスタムタスクの Validate メソッドの作成についての詳細は、「 カスタムタスクのコーディング」をご覧ください。

適用対象