Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Joins between DataSources
Message
From
25/02/2004 14:18:16
 
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
00880796
Message ID:
00880811
Views:
13
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. The 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.
>
>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