Configurations プロパティ
パッケージの構成のコレクションを返します。パッケージは、複数の構成をこのパッケージに関連付けることができます。このプロパティは読み取り専用です。
名前空間: Microsoft.SqlServer.Dts.Runtime
アセンブリ: Microsoft.SqlServer.ManagedDTS (Microsoft.SqlServer.ManagedDTS.dll)
構文
'宣言
Public ReadOnly Property Configurations As Configurations
Get
'使用
Dim instance As Package
Dim value As Configurations
value = instance.Configurations
public Configurations Configurations { get; }
public:
property Configurations^ Configurations {
Configurations^ get ();
}
member Configurations : Configurations
function get Configurations () : Configurations
プロパティ値
型: Microsoft.SqlServer.Dts.Runtime. . :: . .Configurations
Configurations コレクションです。
使用例
次の例では、サンプル パッケージを読み込み、パッケージに関連付けられた構成の数を返します。
class PackageTest
{
static void Main(string[] args)
{
// The variable pkg points to the location of the
// ExecuteProcess package sample installed with the
// samples.
string pkg = @"C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Package Samples\ExecuteProcess Sample\ExecuteProcess\UsingExecuteProcess.dtsx";
Application app = new Application();
Package p = app.LoadPackage(pkg, null);
int n = p.Configurations.Count;
Console.WriteLine("Number of configurations = " + n);
}
}
Class PackageTest
Shared Sub Main(ByVal args() As String)
' The variable pkg points to the location of the
' ExecuteProcess package sample installed with the
' samples.
Dim pkg As String = "C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Package Samples\ExecuteProcess Sample\ExecuteProcess\UsingExecuteProcess.dtsx"
Dim app As Application = New Application()
Dim p As Package = app.LoadPackage(pkg,Nothing)
Dim n As Integer = p.Configurations.Count
Console.WriteLine("Number of configurations = " + n)
End Sub
End Class