Probs Saving Data to Database
-
Hi folks Hope you can give me a hint, I've spent 3 days trying to sort this out! Working in visual studio 2005 proff, with .net framework 3.5. Application has got various forms that are children of a parent. All are loading, adding, saving and deleting fine. Apart from one. I've tried an insert and made it a scaler. I've tried all sorts and just cannot get this to save. It will do MemberID (Primary key) ClientsMare, and clientsid(fk) but clientsname, maresname, percentage no go Here's the Public Sub for Saving. Public Sub SaveMember() Adding = False Deleting = False lblMemberID.Text = CurrentMemberID Me.SyndicateMembersBindingSource.EndEdit(); Me.SyndicateMembersTableAdapter.InsertMember(CurrentSyndicateID, MaresName, CurrentMareID, CurrentPercentage, CurrentClient) Me.SyndicateMembersTableAdapter.Update(Me.DachelDataSet.Tables("SyndicateMembers")) Welcome.btnSave.Enabled = False 'ONCE FINISHED NEED TO MAKE THIS FILL TO A FILLBYSYNDICATEID Me.SyndicateMembersTableAdapter.FillByMember(Me.DachelDataSet.SyndicateMembers, CurrentMemberID) Welcome.btnAdd.Enabled = True End Sub any ideas why I'm having this prob on just one form? Thanks:mad::confused:
Kris MCP
-
Hi folks Hope you can give me a hint, I've spent 3 days trying to sort this out! Working in visual studio 2005 proff, with .net framework 3.5. Application has got various forms that are children of a parent. All are loading, adding, saving and deleting fine. Apart from one. I've tried an insert and made it a scaler. I've tried all sorts and just cannot get this to save. It will do MemberID (Primary key) ClientsMare, and clientsid(fk) but clientsname, maresname, percentage no go Here's the Public Sub for Saving. Public Sub SaveMember() Adding = False Deleting = False lblMemberID.Text = CurrentMemberID Me.SyndicateMembersBindingSource.EndEdit(); Me.SyndicateMembersTableAdapter.InsertMember(CurrentSyndicateID, MaresName, CurrentMareID, CurrentPercentage, CurrentClient) Me.SyndicateMembersTableAdapter.Update(Me.DachelDataSet.Tables("SyndicateMembers")) Welcome.btnSave.Enabled = False 'ONCE FINISHED NEED TO MAKE THIS FILL TO A FILLBYSYNDICATEID Me.SyndicateMembersTableAdapter.FillByMember(Me.DachelDataSet.SyndicateMembers, CurrentMemberID) Welcome.btnAdd.Enabled = True End Sub any ideas why I'm having this prob on just one form? Thanks:mad::confused:
Kris MCP
Because you're using the nasty built in stuff, you're just plain hoping it magically writes the right SQL for you. Write your own SQL and then you'll have control over what it does.
Christian Graus Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
-
Because you're using the nasty built in stuff, you're just plain hoping it magically writes the right SQL for you. Write your own SQL and then you'll have control over what it does.
Christian Graus Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.