DataColumn parentColumn = DataSet1.Tables["person"].Columns["sno"]; DataColumn childColumn = DataSet1.Tables["dept"].Columns["no"]; // Create DataRelation. DataRelation relCustOrder; relCustOrder = new DataRelation("CustomersOrders", parentColumn, childColumn); // Add the relation to the DataSet. DataSet1.Relations.Add(relCustOrder); //DataSet1.Relations.Add(relCustOrder); ForeignKeyConstraint fkeyConstraint = new ForeignKeyConstraint("fkey", parentColumn, childColumn); fkeyConstraint.DeleteRule = Rule.SetNull;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)