Datagrid on two tables

V

Vik

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

Thank you.
 
C

Curt_C [MVP]

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
 
M

Marina

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.
 
V

Vik

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
 
V

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top