dzonka
November 8th, 2008, 06:06 PM
ADO.NET offers a great functionality which makes it very easy to implement databinding (two directional - read and write). Let`s assume that we have a DataSet with some simple DataTable tied with TableAdapter.
Here is what we have to do:
1) Create DataTable with the standard GetData method from the Adapter
2) Assign this datatable as binding source for our datagridview on UI
3) When user makes some changes in the datagridview, it is enough to call 'Update' method on the Adapter to transfer all changes into database.
This is very easy and fast to implement. However it does not work when our DataTable contains data from more than 1 physical tables from database (any joins in select clause).
Why is it impossible? The update method on tableAdapter does not generate at all. How to solve this?
Thank you very much for any help!
Here is what we have to do:
1) Create DataTable with the standard GetData method from the Adapter
2) Assign this datatable as binding source for our datagridview on UI
3) When user makes some changes in the datagridview, it is enough to call 'Update' method on the Adapter to transfer all changes into database.
This is very easy and fast to implement. However it does not work when our DataTable contains data from more than 1 physical tables from database (any joins in select clause).
Why is it impossible? The update method on tableAdapter does not generate at all. How to solve this?
Thank you very much for any help!