Updating the Dataset
Posted on 2006-04-20
I've got a pretty simple one, "I think". I originally created a form with a datagrid based off of a DataAdapter/Dataset created by the wizard. Along with that, I had an "Update" button and everything worked. Since then, I moved the DataAdapter/DataSet into the code for more control. However, now my Update button isn't working and I'm having a hard time fixing it. Any ideas? Here's the code I'm using currently:
Private Sub Updatebtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Updatebtn.Click
Dim strConnectionString1 As String = _
"Provider = Microsoft.Jet.OLEDB.4.0;" & _
"Data Source = C:\progr\progr_be.mdb;"
Dim strsqlA = _
"SELECT * FROM Actives;"
Dim objConnection1 As New OleDb.OleDbConnection(strConnectionString1)
Dim OleDBDataAdapter1 As New OleDb.OleDbDataAdapter(strsqlA, objConnection1)
Dim ActivesDS1 As New DataSet()
' OleDBDataAdapter1.Fill(ActivesDS1, "Actives")
' DataGrid1.DataSource = ActivesDS1.Tables(0)
If ActivesDS1.HasChanges Then