469,950 Members | 2,141 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,950 developers. It's quick & easy.

Help constructing a database-type view from a DataSet object

I have a DataSet where two tables have a relation (the
parent / child relationship is also successfully added to
the DataSet Relations collection). I am looking for a
way to programmatically construct something analogous to
a database view where the record (or row) would show
table1.Field1, table1.field2, table2.Field2, etc.

I tried using a DataView object, but this appears to
allow only filtering and sorting.

Does anyone know how to crate such a view from DataSet
tables and relations?

Gary

Nov 20 '05 #1
3 1341

Really, I would expect you to do this in your query using a join resulting
in a single table.
OHM

Gary wrote:
I have a DataSet where two tables have a relation (the
parent / child relationship is also successfully added to
the DataSet Relations collection). I am looking for a
way to programmatically construct something analogous to
a database view where the record (or row) would show
table1.Field1, table1.field2, table2.Field2, etc.

I tried using a DataView object, but this appears to
allow only filtering and sorting.

Does anyone know how to crate such a view from DataSet
tables and relations?

Gary


Regards - OHM# OneHandedMan{at}BTInternet{dot}com
Nov 20 '05 #2

OHM

I have a project-related constraint not allowing me use a
join within an SQL statement. Specifically, my lookup
tables are stored in an XML file which are read into a
DataSet. I use an SQL statement to select records from
SQLServer and add those records into a Table within the
DataSet.

So, do you have ideas on how I might accomplish this task?
-----Original Message-----

Really, I would expect you to do this in your query using a join resultingin a single table.
OHM

Gary wrote:
I have a DataSet where two tables have a relation (the
parent / child relationship is also successfully added to the DataSet Relations collection). I am looking for a
way to programmatically construct something analogous to a database view where the record (or row) would show
table1.Field1, table1.field2, table2.Field2, etc.

I tried using a DataView object, but this appears to
allow only filtering and sorting.

Does anyone know how to crate such a view from DataSet
tables and relations?

Gary


Regards - OHM# OneHandedMan{at}BTInternet{dot}com
.

Nov 20 '05 #3
ermm. There is something similar that you can do with the bindings on a pair
of datagrids where you can point the datasource for the second grid to the
relation. This has the effect of an Order/Order Details display for grid one
and two so if you click on the order the details are displayed in the bottom
without any coding at all.

Perhaps this functionality could be leveraged to acomplish what you are
trying to do. I dont think there is a direct way to do this, having said
that, it probably would be wise to post this to the adonet newsgroup where
people answer questions like this all the time, someone may have done this.
If so please come back and let us know what the solution was.

Regards - OHM

an*******@discussions.microsoft.com wrote:
OHM

I have a project-related constraint not allowing me use a
join within an SQL statement. Specifically, my lookup
tables are stored in an XML file which are read into a
DataSet. I use an SQL statement to select records from
SQLServer and add those records into a Table within the
DataSet.

So, do you have ideas on how I might accomplish this task?
-----Original Message-----

Really, I would expect you to do this in your query using a join
resulting in a single table.
OHM

Gary wrote:
I have a DataSet where two tables have a relation (the
parent / child relationship is also successfully added to
the DataSet Relations collection). I am looking for a
way to programmatically construct something analogous to
a database view where the record (or row) would show
table1.Field1, table1.field2, table2.Field2, etc.

I tried using a DataView object, but this appears to
allow only filtering and sorting.

Does anyone know how to crate such a view from DataSet
tables and relations?

Gary


Regards - OHM# OneHandedMan{at}BTInternet{dot}com
.


Regards - OHM# OneHandedMan{at}BTInternet{dot}com
Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Neil | last post: by
8 posts views Thread by Dynamo | last post: by
6 posts views Thread by Big George | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.