Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataRelation multiple columns

Status
Not open for further replies.

NervousRex

Programmer
Sep 4, 2003
66
US
I am trying to create a dataset relation between 2 columns in the parent, and 2 in the child but not having any luck

id1 is unique

id2 is not


What I need is id1 and id2 combined to make a unique relation. I don't know how else to describe it so I'll try to draw out what I want id1 will be numbers, id2 letters. This is a grid, each row will have a sub grid


1 A
- subgrid for 1 A
1 B
- subgrid for 1 B
2 A
- subgird for 2 A



Is that possible without creating a unique value for each combo?



 
If you look at the DataRelation object, there are a few constrictors that take arrays as the parameters for parent and child columns. Some take arrays of DataColumn objects, while othere take string arrays of column names. Use one of these to do a multi-column relation.



I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day! Ye has a choice: talk like a pira
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top