DtsProperty.SetExport Method
Sets the export flag for the specified object.
命名空間: Microsoft.SqlServer.Dts.Runtime
組件: Microsoft.SqlServer.ManagedDTS (in microsoft.sqlserver.manageddts.dll)
語法
'宣告
Public Sub SetExport ( _
o As Object, _
export As Boolean _
)
public void SetExport (
Object o,
bool export
)
public:
void SetExport (
Object^ o,
bool export
)
public void SetExport (
Object o,
boolean export
)
public function SetExport (
o : Object,
export : boolean
)
參數
- o
The object on which the flag is being set.
- export
The Boolean value to set on the object's export flag.
範例
The following example shows the creation of a new package and a variable, var, being added to the Variables collection owned by the Package. A Variable has a Properties collection, as well as several other objects, and this example shows the SetExport method being set for the variable.
Package p2 = new Package();
Variable v = p2.Variables.Add("var", false, "", 1);
p2.EnableConfigurations = true;
Configuration c1 = p2.Configurations.Add();
c1.ConfigurationString = @"c:\conf.ini";
c1.ConfigurationType = DTSConfigurationType.IniFile;
v.Properties["Value"].SetExport(v, true);
// more code here…
Dim p2 As Package = New Package()
Dim v As Variable = p2.Variables.Add("var",False,"",1)
p2.EnableConfigurations = True
Dim c1 As Configuration = p2.Configurations.Add()
c1.ConfigurationString = "c:\conf.ini"
c1.ConfigurationType = DTSConfigurationType.IniFile
v.Properties("Value").SetExport(v, True)
' more code here…
執行緒安全性
Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
平台
開發平台
如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。
目標平台
如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。
請參閱
參考
DtsProperty Class
DtsProperty Members
Microsoft.SqlServer.Dts.Runtime Namespace