Help constructing a database-type view from a DataSet object

  • Thread starter Thread starter Gary
  • Start date Start date
G

Gary

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
 
Really, I would expect you to do this in your query using a join resulting
in a single table.


OHM
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
 
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?
 
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

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?

Regards - OHM# OneHandedMan{at}BTInternet{dot}com
 
Back
Top