ForeignKeyConstraint.UpdateRule プロパティ
アセンブリ: System.Data (system.data.dll 内)

Dim instance As ForeignKeyConstraint Dim value As Rule value = instance.UpdateRule instance.UpdateRule = value
/** @property */ public Rule get_UpdateRule () /** @property */ public void set_UpdateRule (Rule value)
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

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からForeignKeyConstraint.UpdateRule プロパティを検索する場合は、下記のリンクをクリックしてください。

- ForeignKeyConstraint.UpdateRule プロパティのページへのリンク