justlearning
Member
- Joined
- Dec 11, 2008
- Messages
- 16
- Programming Experience
- Beginner
Hi, I am sorry to bother you but I am desperate for help. I am running vb.net (vb2005). I built two tables using sql and ado.net. Everything works on the entire program except the update/save button. I dragged the tables onto the form so the code was automatically generated. So I am not really sure what I could have done wrong. It was suggested to me that it could be because of my queries but to verify that it was due to the queries I created a new program with one table and no code written by me. I set up the table as a sql data source and dragged it onto the only form in the test program. I ran it and tried to save some changes but it didn't work. This leads me to believe that the automatically generated code is doing something wrong. My code is below for you to see. Please let me know if you can think of any reason why the update/save button wouldn't work.
For verification, when the update/save button is clicked there is literally nothing that changes at all.
Thanks so much for the help....
For verification, when the update/save button is clicked there is literally nothing that changes at all.
Thanks so much for the help....
VB.NET:
Public Class EditMovieForm
Private Sub TitleBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
'validate for all
Me.Validate()
'Title Binding Source and Table Adapter
Me.TitleBindingSource.EndEdit()
Me.TitleTableAdapter.Update(Me.SqlmovieprojectdbDataSet)
''Starring Binding Source and Table Adapter
Me.StarringBindingSource.EndEdit()
Me.StarringTableAdapter.Update(SqlmovieprojectdbDataSet)
End Sub
Private Sub editmovieinfo_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'SqlmovieprojectdbDataSet.Starring' table. You can move, or remove it, as needed.
Me.StarringTableAdapter.Fillbyabc(Me.SqlmovieprojectdbDataSet.Starring)
'TODO: This line of code loads data into the 'SqlmovieprojectdbDataSet.Title table. You can move, or remove it, as needed.
Me.TitleTableAdapter.Fillbyabc(Me.SqlmovieprojectdbDataSet.Title)
End Sub
Private Sub embytitlebtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles embytitlebtn.Click
'call movietitles form
MovieTitles.Show()
End Sub
Private Sub embystarbtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles embystarbtn.Click
'Call moviestars form
MovieStars.Show()
End Sub
Private Sub embygenre_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles embygenre.Click
'Call genre form
Genre.Show()
End Sub
Private Sub EMexitbtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EMexitbtn.Click
'close editmovieinfo
Me.Close()
End Sub
End Class