Datagrid on two tables

  • Thread starter Thread starter Vik
  • Start date Start date
V

Vik

Is it possible to have a dataview and a datagrid based on two or more tables
in a dataset?

Thank you.
 
I think you will have to specify the table... why would you want to though?
I mean I can't think of a use. if you need data from both use a join, use
the resulting view to display
 
Are you using a data adapter and a command builder to do the update?

In that case, you can change the select statement of the data adapter to be
a SELECT with just the columns from the first table, generate the command
builder and do the update. Then change the select statement to be a SELECT
with just the columns from the second table, generate the command builder,
and do the update.

That way your original query can be a join, but then using this method you
should be able to update both database tables.
 
If I use a view (one to many), I can't update the data. So, I want two
separate tables in the dataset that I can updated and I want the datagrid
representing the join of these tables.

Vik
 
Thank you.

Marina said:
Are you using a data adapter and a command builder to do the update?

In that case, you can change the select statement of the data adapter to be
a SELECT with just the columns from the first table, generate the command
builder and do the update. Then change the select statement to be a SELECT
with just the columns from the second table, generate the command builder,
and do the update.

That way your original query can be a join, but then using this method you
should be able to update both database tables.
 
Back
Top