954,535 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

deleting record from db using tableadapter

PrivateSub BindingNavigatorDeleteItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BindingNavigatorDeleteItem.Click
 
Dim rowDeleting As portfolioDBDataSet.CRS_AccomplishRow
 
rowDeleting = PortfolioDBDataSet.CRS_Accomplish.Rows(CRS_AccomplishBindingSource.Position)
rowDeleting.Delete()
 
Me.CRS_AccomplishTableAdapter.Update(Me.PortfolioDBDataSet.CRS_Accomplish)
 
End Sub


this is the function I have, it shows no errors, but if I try to delete the first record it shows that it deletes all of them, but if I close and re-open it shows the ones that were not deleted. I have all of my other code setup using this sort of method for updates and adding records, and it all works just fine. I would like to stay consistent, and don't really want to change all of the other code so if anyone could help me figure out what is going on with this, or point me in the right direction, I would appreciate it. Thanks

Mr.Wobbles
Light Poster
49 posts since Jun 2007
Reputation Points: 10
Solved Threads: 2
 

Little update, it causes the record I want to delete and the record after it to disappear, but if I re-open the program the record after is still there. not sure why...

Mr.Wobbles
Light Poster
49 posts since Jun 2007
Reputation Points: 10
Solved Threads: 2
 

Actually the row in question is deleted. but it is not made persistant in the database why? the client side cursor only you might have used for the deletion.
Check up and let me know. I am on line.

AV Manoharan
Junior Poster
166 posts since Jun 2007
Reputation Points: 10
Solved Threads: 9
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You