Guys,
Populated a grid using dataset(connected using ODBC adapter). Now I can update or delete the row in datagrid , but the changes are not reflected in the actual database. Hope someone can provide some snippet on how to do so?
My current coding looks like:
Dim myDS As DataSet = New DataSet()
Dim adapter As New OdbcDataAdapter()
Private Sub frmUsers_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim conn As New OdbcConnection(strCon)
adapter.SelectCommand = New OdbcCommand("Select * from UsersTable", conn)
adapter.Fill(myDS)
dgUsers.SetDataBinding(myDS, "UsersTable")
End Sub
Populated a grid using dataset(connected using ODBC adapter). Now I can update or delete the row in datagrid , but the changes are not reflected in the actual database. Hope someone can provide some snippet on how to do so?
My current coding looks like:
Dim myDS As DataSet = New DataSet()
Dim adapter As New OdbcDataAdapter()
Private Sub frmUsers_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim conn As New OdbcConnection(strCon)
adapter.SelectCommand = New OdbcCommand("Select * from UsersTable", conn)
adapter.Fill(myDS)
dgUsers.SetDataBinding(myDS, "UsersTable")
End Sub