Question database does not update

learnvb

New member
Joined
Jul 19, 2009
Messages
4
Programming Experience
Beginner
hi
i am new at vb.net. i am following a tutorial code by code ....every thing works fine except that when i click the button it does not update the database. The code is as follow......Any help would be appriciated

public Class Form2

Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.CustomerTableAdapter1.Fill(Me.Database1DataSet1.customer)


End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
BindingSource1.EndEdit()

CustomerTableAdapter1.Update(Database1DataSet1.customer)

End Sub
End Class
 
sorry the the code again

public Class Form2

Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.CustomerTableAdapter1.Fill(Me.Database1DataSet1.customer)


End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
BindingSource1.EndEdit()

CustomerTableAdapter1.Update(Database1DataSet1.customer)

End Sub
End Class
[/COLOR]
 
Back
Top