We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,440 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Datagrid edits not saved

Hi,

I have a MS Access 2003 (.mdb) database called "Assets.mdb" which I display in a datagrid. When I edit entries on the datagrid and click my save update/save button upon reloading of the application they have not been saved. What am I doing wrong?

Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click`

        Try
            Me.Validate()
            Me.AssetListBindingSource.EndEdit()
            Me.AssetListTableAdapter.Update(Me.AssetLink.AssetList)
            MsgBox("Update successful")
        Catch ex As Exception
            MsgBox("Update failed")
        End Try

    End Sub

But the strange thing is if i add a new row in at the borrom and click save, it will update and tay in the database?

Any Ideas?

Many Thanks

1
Contributor
0
Replies
1
View
mattwagner
Newbie Poster
16 posts since Jan 2012
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page generated in 0.0509 seconds using 2.66MB