Hi. If I understand correctly, dataset is a copy of database.
So my question is. How can I programatically update Field1 value to dataset, and how can I then update dataset back to database (for example SQL).
For example:
I have Textbox1, Button1, Button2 and DataGrid1 on Form1.
Textbox1 is not bound to dataset, but Datagrid is.
I know how to make a connection to database and how to fill dataset.
tx a lot
So my question is. How can I programatically update Field1 value to dataset, and how can I then update dataset back to database (for example SQL).
For example:
I have Textbox1, Button1, Button2 and DataGrid1 on Form1.
Textbox1 is not bound to dataset, but Datagrid is.
I know how to make a connection to database and how to fill dataset.
Code:
DataAdapter.Fill(DataSet) now data is copied from database to dataset, and datagrid displays this data
Textbox1.text = "Some Text"
so, how can I do next:
when I press Button1 textbox1.text is updated to Field1 in dataset (but not to database) and I want that DataGrid would display new value.
when I press Button2, the whole DataSet is updated back to database
tx a lot