mattwagner 0 Newbie Poster

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.