Job.CategoryID プロパティ
ジョブ カテゴリを一意に識別する ID 値を取得します。
名前空間: Microsoft.SqlServer.Management.Smo.Agent
アセンブリ: Microsoft.SqlServer.Smo (Microsoft.SqlServer.Smo.dll)
構文
'宣言
<SfcPropertyAttribute(SfcPropertyFlags.Standalone)> _
<SfcKeyAttribute()> _
Public ReadOnly Property CategoryID As Integer
Get
'使用
Dim instance As Job
Dim value As Integer
value = instance.CategoryID
[SfcPropertyAttribute(SfcPropertyFlags.Standalone)]
[SfcKeyAttribute()]
public int CategoryID { get; }
[SfcPropertyAttribute(SfcPropertyFlags::Standalone)]
[SfcKeyAttribute()]
public:
property int CategoryID {
int get ();
}
[<SfcPropertyAttribute(SfcPropertyFlags.Standalone)>]
[<SfcKeyAttribute()>]
member CategoryID : int
function get CategoryID () : int
プロパティ値
型: System.Int32
ジョブ カテゴリの ID 値を示す In32 値です。
説明
ジョブが属するカテゴリを参照する ID 値です。 カテゴリは、JobCategory オブジェクトを使用して定義できます。
使用例
次のコード例では、ジョブがカテゴリ 1 に属することを指定します。
C#
Job jb = new Job();
jb.CategoryID = 1;
PowerShell
$jb = new-object Microsoft.SqlServer.Management.Smo.Agent.Job
$jb.CategoryID = 1
関連項目
参照
Microsoft.SqlServer.Management.Smo.Agent 名前空間