justlearning
Member
- Joined
- Dec 11, 2008
- Messages
- 16
- Programming Experience
- Beginner
I have been doing this project for my final (due tomorrow) for a week. I finally got my data to save and everything working right except for one problem. On my add/edit form I can add a whole new movie, which includes the movie id, movie genre, movie title, and all the actors/actresses in the movie. What I cannot add is movies to actors/actresses. For instance: Morgan Freeman was in both Along Came a Spider and Kiss the Girls. I cannot figure out how to get this to work. So what I tried was to change up the parent form. So now I have two forms, one to add the movie, title and actor/actress(s) and one to add the movies to the actor/actress. New problem, now when I display my titles I have two of the same title with different actors/actresses. For instance:
Along Came a Spider
Morgan Freeman
Along Came a Spider
Monica Potter
Kiss the Girls
Morgan Freeman
Kiss the Girls
Ashley Judd
What I am going for here is:
Along Came A Spider
Morgan Freeman
Monica Potter
Kiss the Girls
Morgan Freeman
Ashley Judd
I am not sure my code will do you any good at this point but I will give you code from both the add/edit forms and a screenshot of my dataset.xsd with the relationships identified. Please Please Please help me...
Thank you so much
Add movie title to individual stars
Edit/Add title, movie information, star for individual movie
Thank you for any help you can give me.
My screen shot is too big to send to you apparently.
Along Came a Spider
Morgan Freeman
Along Came a Spider
Monica Potter
Kiss the Girls
Morgan Freeman
Kiss the Girls
Ashley Judd
What I am going for here is:
Along Came A Spider
Morgan Freeman
Monica Potter
Kiss the Girls
Morgan Freeman
Ashley Judd
I am not sure my code will do you any good at this point but I will give you code from both the add/edit forms and a screenshot of my dataset.xsd with the relationships identified. Please Please Please help me...
Thank you so much
Add movie title to individual stars
VB.NET:
Public Class AddStars
Private Sub AddStars_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'SqlmovieprojectdbDataSet.Title' table. You can move, or remove it, as needed.
Me.TitleTableAdapter.Filltitleabc(Me.SqlmovieprojectdbDataSet.Title)
'TODO: This line of code loads data into the 'SqlmovieprojectdbDataSet.Starring' table. You can move, or remove it, as needed.
Me.StarringTableAdapter.Fillstarabc(Me.SqlmovieprojectdbDataSet.Starring)
End Sub
Private Sub StarringBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StarringBindingNavigatorSaveItem.Click
'validate all
Me.Validate()
'update star table
Me.StarringBindingSource.EndEdit()
Me.StarringTableAdapter.Update (Me.SqlmovieprojectdbDataSet.Starring)
'Update title table
Me.TitleBindingSource.EndEdit()
Me.TitleTableAdapter.Update(Me.SqlmovieprojectdbDataSet.Title)
End Sub
End Class
Edit/Add title, movie information, star for individual movie
VB.NET:
Public Class EditMovieForm
Private Sub EditMovieForm_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.Fillstarabc(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.Filltitleabc(Me.SqlmovieprojectdbDataSet.Title)
'TODO: This line of code loads data into the 'SqlmovieprojectdbDataSet.Movie' table. You can move, or remove it, as needed.
Me.MovieTableAdapter.Fill(Me.SqlmovieprojectdbDataSet.Movie)
End Sub
Private Sub MovieBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MovieBindingNavigatorSaveItem.Click
Me.Validate()
Me.MovieBindingSource.EndEdit()
Me.MovieTableAdapter.Update(Me.SqlmovieprojectdbDataSet.Movie)
Me.TitleBindingSource.EndEdit()
Me.TitleTableAdapter.Update(Me.SqlmovieprojectdbDataSet.Title)
Me.StarringBindingSource.EndEdit()
Me.StarringTableAdapter.Update(Me.SqlmovieprojectdbDataSet.Starring)
End Sub
End Class
Thank you for any help you can give me.
My screen shot is too big to send to you apparently.