Package.EnableConfigurations 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
패키지가 구성을 불러오는지 여부를 나타내는 값을 받거나 설정합니다.
public:
property bool EnableConfigurations { bool get(); void set(bool value); };
[Microsoft.SqlServer.Dts.Runtime.Localization.LocalizablePropertyDescription(typeof(Microsoft.SqlServer.Dts.Runtime.Localized), "EnableConfigurationsDesc")]
public bool EnableConfigurations { get; set; }
[<Microsoft.SqlServer.Dts.Runtime.Localization.LocalizablePropertyDescription(typeof(Microsoft.SqlServer.Dts.Runtime.Localized), "EnableConfigurationsDesc")>]
member this.EnableConfigurations : bool with get, set
Public Property EnableConfigurations As Boolean
속성 값
패키지가 구성을 로드하면 참입니다; 그렇지 않으면 거짓입니다.
- 특성
예제
다음 예시는 새 패키지를 생성하고, 그 다음 와 속성 를 trueExportConfigurationFile 설정합니다EnableConfigurations. 그 후 예제는 패키지에 새로운 구성을 추가하고 여러 속성의 값을 설정합니다.
Package pkg = new Package();
pkg.EnableConfigurations = true;
pkg.ExportConfigurationFile("conf.xml");
// Create a variable object and add it to the
// package Variables collection.
Variable varPkg = pkg.Variables.Add("var", false, "", 100);
varPkg.Value = 1;
string packagePathToVariable = varPkg.GetPackagePath();
Configuration config = pkg.Configurations.Add();
config.ConfigurationString = "conf.xml";
config.ConfigurationType = DTSConfigurationType.ConfigFile;
config.PackagePath = packagePathToVariable;
// more code here.
Dim pkg As Package = New Package()
pkg.EnableConfigurations = True
pkg.ExportConfigurationFile("conf.xml")
' Create a variable object and add it to the
' package Variables collection.
Dim varPkg As Variable = pkg.Variables.Add("var",False,"",100)
varPkg.Value = 1
Dim packagePathToVariable As String = varPkg.GetPackagePath()
Dim config As Configuration = pkg.Configurations.Add()
config.ConfigurationString = "conf.xml"
config.ConfigurationType = DTSConfigurationType.ConfigFile
config.PackagePath = packagePathToVariable
' more code here.
설명
이 속성이 로 설정 false되면 로드된 구성에 의해 덮어쓰지 않고 패키지 내 영속된 값들이 사용됩니다.
패키지를 배포할 때는 마지막 설정으로 설정할 false 수 있습니다. 배포 후 패키지가 처음 실행될 때, 패키지 값은 구성 값으로 한 번 덮어쓰여집니다. 패키지에서 사용하는 구성에 대한 자세한 내용은 ' 패키지 구성 만들기'를 참조하세요.