ForeignKeyConstraint.UpdateRule プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ForeignKeyConstraint.UpdateRule プロパティの意味・解説 

ForeignKeyConstraint.UpdateRule プロパティ

行を更新したときにこの制約全体発生するアクション取得または設定します

名前空間: System.Data
アセンブリ: System.Data (system.data.dll 内)
構文構文

Public Overridable Property
 UpdateRule As Rule
Dim instance As ForeignKeyConstraint
Dim value As Rule

value = instance.UpdateRule

instance.UpdateRule = value
public virtual Rule UpdateRule { get; set;
 }
/** @property */
public Rule get_UpdateRule ()

/** @property */
public void set_UpdateRule (Rule value)
public function get UpdateRule
 () : Rule

public function set UpdateRule
 (value : Rule)

プロパティ
Rule 値の 1 つ既定値Cascade です。

使用例使用例

ForeignKeyConstraint を作成し、その各種プロパティ設定し、これを DataTable オブジェクトの ConstraintCollection に追加する例を次に示します

' The next line goes into the Declarations section of the module:
' SuppliersProducts is a class derived from DataSet.
Private suppliersProducts As SuppliersProducts
 

Private Sub CreateConstraint()
   ' Declare parent column and child column variables.
   Dim parentColumn As DataColumn
   Dim childColumn As DataColumn
   Dim fkConstraint As ForeignKeyConstraint

   ' Set parent and child column variables.
   parentColumn = suppliersProducts.Tables("Suppliers").Columns("SupplierID")
   childColumn = suppliersProducts.Tables("Products").Columns("SupplieriD")
   fkConstraint = New ForeignKeyConstraint( _
       "SuppierFKConstraint", parentColumn, childColumn)

   ' Set null values when a value is deleted.
   fkConstraint.DeleteRule = Rule.SetNull
   fkConstraint.UpdateRule = Rule.Cascade
   fkConstraint.AcceptRejectRule = AcceptRejectRule.Cascade

   ' Add the constraint, and set EnforceConstraints to true.
   suppliersProducts.Tables("Suppliers").Constraints.Add(fkConstraint)
   suppliersProducts.EnforceConstraints = True
End Sub
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ForeignKeyConstraint クラス
ForeignKeyConstraint メンバ
System.Data 名前空間
ForeignKeyConstraint.AcceptRejectRule プロパティ
Rule



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「ForeignKeyConstraint.UpdateRule プロパティ」の関連用語

ForeignKeyConstraint.UpdateRule プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



ForeignKeyConstraint.UpdateRule プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS