Bagikan melalui


DtsContainer.LocaleID Properti

Definisi

Mendapatkan atau mengatur Bilangan Bulat yang menunjukkan localeID Microsoft Win32® untuk digunakan saat DtsContainer objek dijalankan.

public:
 property int LocaleID { int get(); void set(int value); };
public int LocaleID { get; set; }
member this.LocaleID : int with get, set
Public Property LocaleID As Integer

Nilai Properti

Bilangan bulat yang mewakili lokal. Nilai –1 menunjukkan bahwa lokal induk harus digunakan. Jika tidak, LocaleID yang diatur pada kontainer ini digunakan.

Contoh

Contoh kode berikut membuat Package, yang merupakan kelas yang mewarisi dari DtsContainer. menunjukkan Package penggunaan beberapa properti yang diwariskan.

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

namespace Microsoft.SqlServer.SSIS.Samples  
{  
    class Program  
    {  
        static void Main(string[] args)  
        {  
            Application app = new Application();  
            Package pkg = new Package();  

            // Package name must be assigned.  
            pkg.Name = "My DtsContainer inheritance test package";  

            // Display the values that manually assigned.  
            Console.WriteLine("Package Name: {0}", pkg.Name);  

            // Packages are assigned the following default values when created.  
            Console.WriteLine("Package ID:           {0}", pkg.ID);  
            Console.WriteLine("FailPackageOnFailure: {0}", pkg.FailPackageOnFailure);  
            Console.WriteLine("FailParentOnFailure:  {0}", pkg.FailParentOnFailure);  
            Console.WriteLine("Locale ID:            {0}", pkg.LocaleID);  
            Console.WriteLine("Is DefaultLocaleID?   {0}", pkg.IsDefaultLocaleID);  
            Console.WriteLine("Isolation Level:      {0}", pkg.IsolationLevel);  
            Console.WriteLine("LoggingMode:          {0}", pkg.LoggingMode);  
            Console.WriteLine("MaximumErrorCount:    {0}", pkg.MaximumErrorCount);  
            Console.WriteLine("TransactionOption:    {0}", pkg.TransactionOption);  
        }  
    }  
}  
Imports System  
Imports System.Collections.Generic  
Imports System.Text  
Imports Microsoft.SqlServer.Dts.Runtime  

Namespace Microsoft.SqlServer.SSIS.Samples  
    Class Program  
        Shared  Sub Main(ByVal args() As String)  
            Dim app As Application =  New Application()   
            Dim pkg As Package =  New Package()   

            ' Package name must be assigned.  
            pkg.Name = "My DtsContainer inheritance test package"  

            ' Display the values that manually assigned.  
            Console.WriteLine("Package Name: {0}", pkg.Name)  

            ' Packages are assigned the following default values when created.  
            Console.WriteLine("Package ID:           {0}", pkg.ID)  
            Console.WriteLine("FailPackageOnFailure: {0}", pkg.FailPackageOnFailure)  
            Console.WriteLine("FailParentOnFailure:  {0}", pkg.FailParentOnFailure)  
            Console.WriteLine("Locale ID:            {0}", pkg.LocaleID)  
            Console.WriteLine("Is DefaultLocaleID?   {0}", pkg.IsDefaultLocaleID)  
            Console.WriteLine("Isolation Level:      {0}", pkg.IsolationLevel)  
            Console.WriteLine("LoggingMode:          {0}", pkg.LoggingMode)  
            Console.WriteLine("MaximumErrorCount:    {0}", pkg.MaximumErrorCount)  
            Console.WriteLine("TransactionOption:    {0}", pkg.TransactionOption)  
        End Sub  
    End Class  
End Namespace  

Contoh Output:

Nama Paket: Paket pengujian pewarisan DtsContainer saya

ID Paket: {2C2FAA96-35BA-4c5e-A39A-C5D7D30A0D79}

FailPackageOnFailure: False

FailParentOnFailure: False

ID Lokal: 1033

Apakah DefaultLocaleID? FALSE

Tingkat Isolasi: Dapat diserialisasikan

LoggingMode: UseParentSetting

MaximumErrorCount: 1

TransactionOption: Didukung

Keterangan

LocaleID diwarisi dari kontainer induk secara default. Jika Anda mewarisi dari kontainer paket dan mengubah paket LocaleID, nilai baru dipertahankan pada kontainer induk dan disebarluaskan ke semua kontainer turunan.

Berlaku untuk