Ok so I am writing code to a contacts database and as i add new info to the table it is not committing to the table.

I have attached my program... idk if you will be able to open it.

But I have 2 buttons one adds a new row to a datagrid and the save is suppose to save the data in the grid to the table called contacts.mdf

Private Sub btnSave_Click(ByVal sender As System.Object,
                ByVal e As System.EventArgs) Handles btnSave.Click
            If newDataAdded Then
                newDataAdded = False
            End If

        Catch ex As Exception
            MessageBox.Show(ex.Message, "Data Error", MessageBoxButtons.OK,
        End Try
    End Sub

this is what i have amounted to to try... but yet no success.

If you could help me to understand how to commit data in vb.net would be much appreciated

This is an access database. I am using sql. The code shown does not explain to me how to use the features in vb to press a button and save the data to the table. The program there is using user defined insert code wheres I want to use predefined vb functions. I am trying to understand the 2008 vb database functions. I could very easily write my way around the database management thing however that's not my goal as a beginner in this.

This article has been dead for over six months. Start a new discussion instead.