V
Venkat Venkataramanan
Hello:
I have a form that has a dataset that has one table, a
command button, and a data-bound textbox. I also have
navigation button that navigates through my dataset.
When I run the application, I see the row values
displayed appropriately.
But when I make changes to the value that is dispalyed
textbox and click on the Update command button to save
the changes, the changes are lost when I refill the
dataset.
But if I navigate to the privious or next row and then
click on the Update button, my changes are saved.
Can somebody explain to me what's happening?
Here's the code
Private Sub Form1_Load(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles MyBase.Load
tbxDDLID.DataBindings.Add(New Binding("Text",
MyDataSet.Tables("DDL"), "DDL_ID_N"))
tbxDDLName.DataBindings.Add(New Binding("Text",
MyDataSet.Tables("DDL"), "DDL_Name_C"))
End Sub
Private Sub btnUpdate_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
btnUpdate.Click
MyDataset.Update()
End Sub
..
I have a form that has a dataset that has one table, a
command button, and a data-bound textbox. I also have
navigation button that navigates through my dataset.
When I run the application, I see the row values
displayed appropriately.
But when I make changes to the value that is dispalyed
textbox and click on the Update command button to save
the changes, the changes are lost when I refill the
dataset.
But if I navigate to the privious or next row and then
click on the Update button, my changes are saved.
Can somebody explain to me what's happening?
Here's the code
Private Sub Form1_Load(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles MyBase.Load
tbxDDLID.DataBindings.Add(New Binding("Text",
MyDataSet.Tables("DDL"), "DDL_ID_N"))
tbxDDLName.DataBindings.Add(New Binding("Text",
MyDataSet.Tables("DDL"), "DDL_Name_C"))
End Sub
Private Sub btnUpdate_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
btnUpdate.Click
MyDataset.Update()
End Sub
..