TAILIEUCHUNG - Creating a ForeignKeyConstraint Object

Creating a ForeignKeyConstraint Object The ForeignKeyConstraint constructor is overloaded as follows: ForeignKeyConstraint(DataColumn parentDataColumn, DataColumn childDataColumn) | Creating a ForeignKeyConstraint Object The ForeignKeyConstraint constructor is overloaded as follows ForeignKeyConstraint DataColumn parentDataColumn DataColumn childDataColumn ForeignKeyConstraint DataColumn parentDataColumns DataColumn childDataColumns ForeignKeyConstraint string constraintName DataColumn parentDataColumn DataColumn childDataColumn ForeignKeyConstraint string constraintName DataColumn parentDataColumns DataColumn childDataColumns ForeignKeyConstraint string constraintName string parentDataTableName string parentDataColumnNames string childDataColumnNames AcceptRejectRule acceptRejectRule Rule deleteRule Rule updateRule where parentDataColumn and parentDataColumns are the DataColumn objects in the parent DataTable. childDataColumn and childDataColumns are the DataColumn objects in the child DataTable. constraintName is the name you want to assign to the ConstraintName property of your ForeignKeyConstraint. parentDataTableName is the name of the parent DataTable. parentDataColumnNames and childDataColumnNames contain the names of the DataColumn objects in the parent and child DataTable objects. acceptRejectRule deleteRule and updateRule are the various rules for the ForeignKey-Constraint. Earlier in the section Creating a UniqueConstraint Object you saw a code example that created two DataTable objects named customersDT and ordersDT. The following example creates a ForeignKeyConstraint object on the CustomerlD DataColumn of ordersDT to the CustomerlD DataColumn of customersDT ForeignKeyConstraint myFKC new ForeignKeyConstraint ForeignKeyConstraintCustomersOrders CustomerID CustomerlD myFKC Notice that the ForeignKeyConstraint is added to ordersDT using the Add method. Note To successfully add a ForeignKeyConstraint to a DataTable each DataColumn value in the child DataTable must have a matching DataColumn value in the parent DataTable. The next example retrieves the constraint just added

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.