ADO.NET / SQL / ADO

Author Thread:How can we create relationships between two tables in a Dataset?
Soara
How can we create relationships between two tables in a Dataset?
Posted:Sunday, September 25, 2005 10:25 PM (CST)

Hi,

Is it possible to create a relationships between two tables in a Dataset, If yes then how can we do that.

 

Thanks

Soara


 


Comments:


Author Thread:
Eswaran
How can we create relationships between two tables in a Dataset?
Posted: Friday, December 14, 2007 7:13 AM (CST)

Hi,

 

We can create a relationship between two tables which are in DataSet.

 

try ths code

ds.Relation.Add("RelationshipeName",ds.Table[0].Columns["CommanColumnName"],ds.Table[1].Columns["CommanColumnName"]);

 

I hope this will work fine.

 

Thanks

R.Eswaran.

 

Ferotech Solution Services Inc.