FtpTask.ExecutionValue 속성

정의

사용자 정의 개체를 반환합니다. 이 속성은 읽기 전용입니다.

public:
 virtual property System::Object ^ ExecutionValue { System::Object ^ get(); };
public override object ExecutionValue { get; }
member this.ExecutionValue : obj
Public Overrides ReadOnly Property ExecutionValue As Object

속성 값

사용자 정의 개체입니다.

예제

다음 코드 예제에서는 FtpTask를 만든 다음 만든 후 포함된 기본값을 보여 줍니다. 일부 필드는 비어 있으며 패키지에서 태스크를 실행하기 전에 명시적으로 설정해야 합니다.

using System;  
using System.Collections.Generic;  
using System.Text;  
using Microsoft.SqlServer.Dts.Runtime;  
using Microsoft.SqlServer.Dts.Tasks.FtpTask;  

namespace FTPTask  
{  
    class Program  
    {  
        static void Main(string[] args)  
        {  
            Package pkg = new Package();  
            Executable exec1 = pkg.Executables.Add("STOCK:FTPTask");  
            TaskHost th = exec1 as TaskHost;  

            // List the default values of the FTP task  
            // using the Properties collection of the TaskHost.  
            Console.WriteLine("Connection           {0}", th.Properties["Connection"].GetValue(th));  
            Console.WriteLine("DebugMode            {0}", th.Properties["DebugMode"].GetValue(th));  
            Console.WriteLine("ExecutionValue       {0}", th.Properties["ExecutionValue"].GetValue(th));  
            Console.WriteLine("IsLocalPathVariable  {0}", th.Properties["IsLocalPathVariable"].GetValue(th));  
            Console.WriteLine("IsRemotePathVariable {0}", th.Properties["IsRemotePathVariable"].GetValue(th));  
            Console.WriteLine("IsTransferTypeASCII  {0}", th.Properties["IsTransferTypeASCII"].GetValue(th));  
            Console.WriteLine("LocalPath            {0}", th.Properties["LocalPath"].GetValue(th));  
            Console.WriteLine("Operation            {0}", th.Properties["Operation"].GetValue(th));  
            Console.WriteLine("OperationName        {0}", th.Properties["OperationName"].GetValue(th));  
            Console.WriteLine("OverwriteDestination {0}", th.Properties["OverwriteDestination"].GetValue(th));  
            Console.WriteLine("RemotePath           {0}", th.Properties["RemotePath"].GetValue(th));  
            Console.WriteLine("StopOnOperationFailure  {0}", th.Properties["StopOnOperationFailure"].GetValue(th));  
            Console.WriteLine("SuspendRequired      {0}", th.Properties["SuspendRequired"].GetValue(th));  

            Console.WriteLine("--------------------------");  
            // Show how to set a property using the TaskHost Properties.  
            th.Properties["Operation"].SetValue(th, DTSFTPOp.Receive);  
            Console.WriteLine("New value of Operation:  {0}", th.Properties["Operation"].GetValue(th));  
        }  
    }  
}  
Imports System  
Imports System.Collections.Generic  
Imports System.Text  
Imports Microsoft.SqlServer.Dts.Runtime  
Imports Microsoft.SqlServer.Dts.Tasks.FtpTask  

Namespace FTPTask  
    Class Program  
        Shared  Sub Main(ByVal args() As String)  
            Dim pkg As Package =  New Package()   
            Dim exec1 As Executable =  pkg.Executables.Add("STOCK:FTPTask")   
            Dim th As TaskHost =  exec1 as TaskHost   

            ' List the default values of the FTP task  
            ' using the Properties collection of the TaskHost.  
            Console.WriteLine("Connection           {0}", th.Properties("Connection").GetValue(th))  
            Console.WriteLine("DebugMode            {0}", th.Properties("DebugMode").GetValue(th))  
            Console.WriteLine("ExecutionValue       {0}", th.Properties("ExecutionValue").GetValue(th))  
            Console.WriteLine("IsLocalPathVariable  {0}", th.Properties("IsLocalPathVariable").GetValue(th))  
            Console.WriteLine("IsRemotePathVariable {0}", th.Properties("IsRemotePathVariable").GetValue(th))  
            Console.WriteLine("IsTransferTypeASCII  {0}", th.Properties("IsTransferTypeASCII").GetValue(th))  
            Console.WriteLine("LocalPath            {0}", th.Properties("LocalPath").GetValue(th))  
            Console.WriteLine("Operation            {0}", th.Properties("Operation").GetValue(th))  
            Console.WriteLine("OperationName        {0}", th.Properties("OperationName").GetValue(th))  
            Console.WriteLine("OverwriteDestination {0}", th.Properties("OverwriteDestination").GetValue(th))  
            Console.WriteLine("RemotePath           {0}", th.Properties("RemotePath").GetValue(th))  
            Console.WriteLine("StopOnOperationFailure  {0}", th.Properties("StopOnOperationFailure").GetValue(th))  
            Console.WriteLine("SuspendRequired      {0}", th.Properties("SuspendRequired").GetValue(th))  

            Console.WriteLine("--------------------------")  
            ' Show how to set a property using the TaskHost Properties.  
            th.Properties("Operation").SetValue(th, DTSFTPOp.Receive)  
            Console.WriteLine("New value of Operation:  {0}", th.Properties("Operation").GetValue(th))  
        End Sub  
    End Class  
End Namespace  

샘플 출력:

연결

DebugMode False

ExecutionValue 0

IsLocalPathVariable False

IsRemotePathVariable False

IsTransferTypeASCII False

LocalPath

작업 0

OperationName

OverwriteDestination False

RemotePath

StopOnOperationFailure True

SuspendRequired False

--------------------------

작업의 새 값: 1

설명

태스크의 속성은 ExecutionValue 태스크가 실행 결과, 메시지 게시 또는 반환 값 반환 DTSExecResult 과 관련된 정보를 노출할 수 있도록 하는 읽기 전용 개체 속성입니다. 예를 들어 태스크가 해당 메서드의 Execute 일부로 테이블에서 행을 삭제하는 경우 삭제된 ExecutionValue행 수를 반환할 수 있습니다. 그런 다음 태스크의 클라이언트는 이 값을 사용하여 태스크 간에 우선 순위 제약 조건을 설정할 수 있습니다.

태스크는 속성의 기본 구현을 ExecutionValue 재정의하고 해당 메서드 중에 Execute 태스크가 설정한 값을 재정의합니다.

적용 대상