Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Joins between DataSources
Message
From
25/02/2004 16:35:29
 
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
00880796
Message ID:
00880888
Views:
12
Wait a minute ... I take that back. I was searching for stuff in the docs and came across something about ChildDataViews. In the index of the help, type in "relationships in DataView" and you'll find the help for this.

I didn't read the whole thing, but it sounds like maybe what you want ...

~~Bonnie


>I am quite surprised! I would consider this a significant weakness in the ADO.NET model. I would consider it a natural feature to be able to query across tables in a dataset. I know I can do this in a VFP dll by returning a join on two result cursors; but management, for some reason, does not want me to mix technologies.
>
>>Troy,
>>
>>I don't think you're going to be able to do this without some work. You'll need to define a new DataTable and fill it manually with the results of separate selects from each table. When you use the DataTable.Select() command, it returns an array of DataRows. I think you'll have to use these two arrays, one from each .Select() and combine them into a new row in your new DataTable. Then you can use this new DataTable as the source for your grid. I know it sounds like a lot of work, and I'm certainly no ADO.NET expert, but I'm fairly certain that you can't do it with views.
>>
>>~~Bonnie
>>
>>
>>>I am trying to join a FoxPro table with an SQL table. I can get both tables into the same dataset, now I want to create some views (I guess) that join these tables so I can bind the view to a datagrid. I was hoping to build a view as a select against both tables and not not use relation objects since the join scenerio is dynamic and I need the equilivant of an outer join.
>>>
>>>DataSet ds = new DataSet();
>>>ds.Tables.Add(DataClass.GetFoxTable("select * from books"));
>>>ds.Tables.Add(DataClass.GetSqlTable("select * from bookprices"));
>>>
>>>The problem is that I cannot find where I can run a select statement against my dataset...
>>>
>>>Please help!
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform