Aracılığıyla paylaş


BulkInsertTask.DataFileType Özelliği

Alır veya ayarlar arasında bir değer DTSBulkInsert_DataFileType numaralandırma kullanmak üzere veri türü değeri gösteriryük operasyon.

Ad Alanı:  Microsoft.SqlServer.Dts.Tasks.BulkInsertTask
Derleme:  Microsoft.SqlServer.BulkInsertTask (Microsoft.SqlServer.BulkInsertTask içinde.dll)

Sözdizimi

'Bildirim
Public Property DataFileType As DTSBulkInsert_DataFileType
    Get
    Set
'Kullanım
Dim instance As BulkInsertTask
Dim value As DTSBulkInsert_DataFileType

value = instance.DataFileType

instance.DataFileType = value
public DTSBulkInsert_DataFileType DataFileType { get; set; }
public:
virtual property DTSBulkInsert_DataFileType DataFileType {
    DTSBulkInsert_DataFileType get () sealed;
    void set (DTSBulkInsert_DataFileType value) sealed;
}
abstract DataFileType : DTSBulkInsert_DataFileType with get, set
override DataFileType : DTSBulkInsert_DataFileType with get, set
final function get DataFileType () : DTSBulkInsert_DataFileType
final function set DataFileType (value : DTSBulkInsert_DataFileType)

Özellik Değeri

Tür: Microsoft.SqlServer.Dts.Tasks.BulkInsertTask.DTSBulkInsert_DataFileType
Arasında bir değer DTSBulkInsert_DataFileType numaralandırma kullanmak üzere veri türü değeri gösteriryük operasyon.

Uygulamalar

IDTSBulkInsertTask.DataFileType

Örnekler

Aşağıdaki örnek oluşturur bir BulkInsertTaskve sonra da dahil olmak üzere özellikleri varsayılan ayarlarını gösterir DataFileType, kullanarak TaskHost.Bu örnek iki alan da dahil olmak üzere, sonra küme DataFileType, nasıl yap alan değerleri göstermek için

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

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

            // List the default values of the Bulk Insert task
            // by using the Properties collection of the TaskHost.
            Console.WriteLine("BatchSize             {0}", th.Properties["BatchSize"].GetValue(th));
            Console.WriteLine("CheckConstraints      {0}", th.Properties["CheckConstraints"].GetValue(th));
            Console.WriteLine("CodePage              {0}", th.Properties["CodePage"].GetValue(th));
            Console.WriteLine("DataFileType          {0}", th.Properties["DataFileType"].GetValue(th));
            Console.WriteLine("DebugMode             {0}", th.Properties["DebugMode"].GetValue(th));
            Console.WriteLine("DestinationConnection {0}", th.Properties["DestinationConnection"].GetValue(th));
            Console.WriteLine("DestinationTableName  {0}", th.Properties["DestinationTableName"].GetValue(th));
            Console.WriteLine("FieldTerminator       {0}", th.Properties["FieldTerminator"].GetValue(th));
            Console.WriteLine("FireTriggers          {0}", th.Properties["FireTriggers"].GetValue(th));
            Console.WriteLine("FirstRow              {0}", th.Properties["FirstRow"].GetValue(th));
            Console.WriteLine("FormatFile            {0}", th.Properties["FormatFile"].GetValue(th));
            Console.WriteLine("KeepIdentity          {0}", th.Properties["KeepIdentity"].GetValue(th));
            Console.WriteLine("KeepNulls             {0}", th.Properties["KeepNulls"].GetValue(th));
            Console.WriteLine("LastRow               {0}", th.Properties["LastRow"].GetValue(th));
            Console.WriteLine("MaximumErrors         {0}", th.Properties["MaximumErrors"].GetValue(th));
            Console.WriteLine("RowTerminator         {0}", th.Properties["RowTerminator"].GetValue(th));
            Console.WriteLine("SortedData            {0}", th.Properties["SortedData"].GetValue(th));
            Console.WriteLine("SourceConnection      {0}", th.Properties["SourceConnection"].GetValue(th));
            Console.WriteLine("SqlStatement          {0}", th.Properties["SqlStatement"].GetValue(th));
            Console.WriteLine("SuspendRequired       {0}", th.Properties["SuspendRequired"].GetValue(th));
            Console.WriteLine("TableLock             {0}", th.Properties["TableLock"].GetValue(th));
            Console.WriteLine("UseFormatFile         {0}", th.Properties["UseFormatFile"].GetValue(th));

            Console.WriteLine("--------------------------");
            // Show how to set a property by using the TaskHost Properties.
            th.Properties["CheckConstraints"].SetValue(th, true);
            th.Properties["DataFileType"].SetValue(th, DTSBulkInsert_DataFileType.DTSBulkInsert_DataFileType_Native);
            Console.WriteLine("New value of CheckConstraints and DataFileType:  {0}, {1}", th.Properties["CheckConstraints"].GetValue(th), th.Properties["DataFileType"].GetValue(th));
        }
    }
}
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports Microsoft.SqlServer.Dts.Runtime
Imports Microsoft.SqlServer.Dts.Tasks.BulkInsertTask
 
Namespace Microsoft.SqlServer.SSIS.Samples
    Class Program
        Shared  Sub Main(ByVal args() As String)
            Dim pkg As Package =  New Package() 
            Dim exec1 As Executable =  pkg.Executables.Add("STOCK:BulkInsertTask") 
            Dim th As TaskHost =  exec1 as TaskHost 
 
            ' List the default values of the Bulk Insert task
            ' by using the Properties collection of the TaskHost.
            Console.WriteLine("BatchSize             {0}", th.Properties("BatchSize").GetValue(th))
            Console.WriteLine("CheckConstraints      {0}", th.Properties("CheckConstraints").GetValue(th))
            Console.WriteLine("CodePage              {0}", th.Properties("CodePage").GetValue(th))
            Console.WriteLine("DataFileType          {0}", th.Properties("DataFileType").GetValue(th))
            Console.WriteLine("DebugMode             {0}", th.Properties("DebugMode").GetValue(th))
            Console.WriteLine("DestinationConnection {0}", th.Properties("DestinationConnection").GetValue(th))
            Console.WriteLine("DestinationTableName  {0}", th.Properties("DestinationTableName").GetValue(th))
            Console.WriteLine("FieldTerminator       {0}", th.Properties("FieldTerminator").GetValue(th))
            Console.WriteLine("FireTriggers          {0}", th.Properties("FireTriggers").GetValue(th))
            Console.WriteLine("FirstRow              {0}", th.Properties("FirstRow").GetValue(th))
            Console.WriteLine("FormatFile            {0}", th.Properties("FormatFile").GetValue(th))
            Console.WriteLine("KeepIdentity          {0}", th.Properties("KeepIdentity").GetValue(th))
            Console.WriteLine("KeepNulls             {0}", th.Properties("KeepNulls").GetValue(th))
            Console.WriteLine("LastRow               {0}", th.Properties("LastRow").GetValue(th))
            Console.WriteLine("MaximumErrors         {0}", th.Properties("MaximumErrors").GetValue(th))
            Console.WriteLine("RowTerminator         {0}", th.Properties("RowTerminator").GetValue(th))
            Console.WriteLine("SortedData            {0}", th.Properties("SortedData").GetValue(th))
            Console.WriteLine("SourceConnection      {0}", th.Properties("SourceConnection").GetValue(th))
            Console.WriteLine("SqlStatement          {0}", th.Properties("SqlStatement").GetValue(th))
            Console.WriteLine("SuspendRequired       {0}", th.Properties("SuspendRequired").GetValue(th))
            Console.WriteLine("TableLock             {0}", th.Properties("TableLock").GetValue(th))
            Console.WriteLine("UseFormatFile         {0}", th.Properties("UseFormatFile").GetValue(th))
 
            Console.WriteLine("--------------------------")
            ' Show how to set a property by using the TaskHost Properties.
            th.Properties("CheckConstraints").SetValue(th, True)
            th.Properties("DataFileType").SetValue(th, DTSBulkInsert_DataFileType.DTSBulkInsert_DataFileType_Native)
            Console.WriteLine("New value of CheckConstraints and DataFileType:  {0}, {1}", th.Properties("CheckConstraints").GetValue(th), th.Properties("DataFileType").GetValue(th))
 
        End Sub
    End Class
End Namespace

Örnek Çıktı:

BatchSize 0

CHECKCONSTRAINTS yanlış

CodePage raw

DataFileType 0

DebugMode False

DestinationConnection

DestinationTableName

FieldTerminator sekmesi

FireTriggers False

FirstRow 1

FormatFile

KEEPIDENTITY yanlış

KeepNulls False

LastRow 0

MaximumErrors 0

RowTerminator {cr} {lf}

SortedData

KaynakBağlantı

Sqldeyimi System.String]

SuspendRequired False

TableLock False

UseFormatFile False

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

Yeni değeri CHECKCONSTRAINTS ve DataFileType: Doğru 1