how to save data into multiple table

  • Thread starter Thread starter cEciLlE
  • Start date Start date
C

cEciLlE

i have 3 tables in the sql server. and each table is related by a certain
id.

i ll can get the data into the dataset by using a select statement that has
join table properties.

but my problem is that when i make changes into the table i must save the
data back to its original tables.

how can i do this??

i was planning to have 3 separate data adapters so that when i update the
database the data will be save accordingly.

please help me. thanks
 
You might want to select the data you want using three separate SELECT
statements and add the relationships between the tables once the data is in
the DataSet. This way you can update the tables in the data source
individually, while still making sure your relationships are enforced on the
client. Unfortunately the DataSet can't handle JOINs if you want to update
the data source.
 
yes, i have already done that.. i created 3 adapters each have its select
statement for each table.

but i have another problem, how can i display the data in the data grid that
it will look like one table.


also..how can i update my datasource??

can someone please give me a sample source code??

thanks
 
cEciLlE said:
yes, i have already done that.. i created 3 adapters each have its select
statement for each table.

but i have another problem, how can i display the data in the data grid that
it will look like one table.


also..how can i update my datasource??

can someone please give me a sample source code??

thanks

Hi cEciLlE

To make your DataSet look like one table you might to have a look at the
DataView and the DataViewManager classes. They provide the capabilities of
customizing your datasource for a view to the user in runtime, without
modifying you datasource.

-Kevin
 
Back
Top