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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataSet Select

Status
Not open for further replies.

TCavins

Programmer
Aug 8, 2001
25
US
I have a DataSet with two tables named "FirstResults" and "SecondResults". Both return the same number of rows and the same columns.

SecondResults may have some different information than FirstResults and it may have identical information.

I would like to get everything from the SecondResults table where one of its columns equals the identical column from FirstResults.

I tried creating a relation between the two but since not every record in SecondResults will have a parent record, it errored out. This is what I tried:

oDS.Relations.Add("myRelation",oDS.Tables["FirstResults"].Columns["testColumn"], oDS.Tables["SecondResults"].Columns["testColumn"]);

Any help would be appreciated.

Thank you.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top