R
Rich
Hello,
I have a data grid (grd1) on a form (vb.net) which
displays data correctly from an Access mdb table. I
populate the grid control with a typed dataset (ds1) which
I fill from a data adapter (da1), connection conn1.
Now I want to insert a record into the Access table and
reflect the new record on the grid. Here is my code which
does not work.
Private Sub btn1_click(...)
Dim cmd As New OleDBCommand("Insert Into tbl1(fld1) Values
('test')")
da1.InsertCommand = cmd
da1.Update(ds1)
End Sub
I respectfully request if someone could explain to me how
to do this correctly.
Thanks,
Rich
I have a data grid (grd1) on a form (vb.net) which
displays data correctly from an Access mdb table. I
populate the grid control with a typed dataset (ds1) which
I fill from a data adapter (da1), connection conn1.
Now I want to insert a record into the Access table and
reflect the new record on the grid. Here is my code which
does not work.
Private Sub btn1_click(...)
Dim cmd As New OleDBCommand("Insert Into tbl1(fld1) Values
('test')")
da1.InsertCommand = cmd
da1.Update(ds1)
End Sub
I respectfully request if someone could explain to me how
to do this correctly.
Thanks,
Rich