Data Relationship Between Two Fields Of Table...


 private void Button1_Click(System.Object sender, System.EventArgs e)
{
//Here In "Students" Table "StudentID" Is Primary Key & It Will Do Relation With "Results" Table's "StudentID" Field As Foreig Key...
	DataSet ds = new DataSet();
	DataRelation StudentsResultsRelation = new DataRelation("StudentsResults", ds.Customers.Columns("StudentID"), ds.Orders.Columns("StudentID"));
	//Add New Created Relation...
	ds.Relations.Add(StudentsResultsRelation);
}
Ebook Download
View all
Learn
View all