General information
Title:
Datarelation questions...
If 2 tables are related using the dataRelation object,
do deletes cascade through the established in memory relationship?
Can you related more that 2 tables using a single DataRelation Object?
will the code below work?
DataColumn Tables;
DataColumn Chairs;
DataColumn TablesToChairs;
// Code to get the DataSet not shown here.
Tables = DataSet1.Tables["Tables"].Columns["TableID"];
TablesToChairs = DataSet1.Tables["TableToChairRel"].Columns["TableID"];
Chairs = DataSet1.Tables["Chairs"].Columns["ChairID"];
// Create DataRelation.
DataRelation relTablesToChairs;
relTablesToChairs = new DataRelation("CustomersOrders", Tables, TableToChair,Chairs);
// Add the relation to the DataSet.
DataSet1.Relations.Add(relTablesToChairs);
Thanks for your help,
Alvin
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only