F
Flare
Hi.
I have (simplified) 3 tables. (See bottom). This is not my real tables but
they show my point. I want to represent data from all tree tables and i
wanna do this by joining them. The joined data will be represented in a
datagrid, where editing,inserting, deleting will be aviable.Update is ok for
now.
How do i do this the right ADO.net way? I just cant figure out an elegant
way to perform the update. Eg. i can make a view wich fetch the data, and
put it in the grid....But how do i update the right tables on an elegant
way? Eg. I edit a country tag, and want to peform an update.
Ideally i have my database, a webservive from where i get a dataset, and
where i (maybe sent som kind of a diffgram) wich enable the webservice to
perform the updates. All this i can figure out if it wasnt for the joins.
Anyone know how to work with joined tables in ADO.net or have some links? I
have used HOURS to read "all" the MSDN articles about datasets, dataadpters,
autogen commands, but nothing seems to solve my problem ....an "easy" way.
It cant be right that i have to wirte a stored-proc where i sent (see
bottom) all me variables and make it update each and every table manually?
Looking forward to some inputs.
Regards Anders
======Tables========
TablePerson
-------------
Id
Country_FKId
City_FKId
TableCountry
I have (simplified) 3 tables. (See bottom). This is not my real tables but
they show my point. I want to represent data from all tree tables and i
wanna do this by joining them. The joined data will be represented in a
datagrid, where editing,inserting, deleting will be aviable.Update is ok for
now.
How do i do this the right ADO.net way? I just cant figure out an elegant
way to perform the update. Eg. i can make a view wich fetch the data, and
put it in the grid....But how do i update the right tables on an elegant
way? Eg. I edit a country tag, and want to peform an update.
Ideally i have my database, a webservive from where i get a dataset, and
where i (maybe sent som kind of a diffgram) wich enable the webservice to
perform the updates. All this i can figure out if it wasnt for the joins.
Anyone know how to work with joined tables in ADO.net or have some links? I
have used HOURS to read "all" the MSDN articles about datasets, dataadpters,
autogen commands, but nothing seems to solve my problem ....an "easy" way.
It cant be right that i have to wirte a stored-proc where i sent (see
bottom) all me variables and make it update each and every table manually?
Looking forward to some inputs.
Regards Anders
======Tables========
TablePerson
-------------
Id
Country_FKId
City_FKId
TableCountry