I'm just trying to add a new row of data to a dataset, but whenever the form is closed, it loses the data.
...End SubCase "Add"ElementsDataSet.AcceptChanges()TgtRw = ElementsDataSet.Tables("Elements").NewRow()End Select
TgtRw("EID") = Guid.NewGuid
TgtRw("AL_ID") = Key
TgtRw("EType") = "R"
ElementsDataSet.Tables("Elements").Rows.Add(TgtRw)
ElementsDataSet.Tables("Elements").AcceptChanges()
The form contains a gridview which is linked to the dataset, but not used for editing the data.
While the form is open, the new datarows are visible in the gridview. Everything works fine until the form is closed - reopened, the tables are empty.
btw: VS 2005; SQLExpress
Can anyone help?
Thanks!