Private Sub Form1_load(ByVal sender As Object,ByVal e As System.EventArgs)
Dim conn As New OleDbConnection()
Dim strDSN As String ="provider=Microsoft.Jet.OLEDB.4.0;" &"Data Source= C:/Northwind.mdb"
conn.ConnectionString = strDSN
Dim sql As String = "SELECT EmployeeID, LastName, FirstName FROM Employees" ' Opening Connection
conn.Open()
' Create a data Adapter
Dim daAs New OleDbDataAdapter(sql, conn)
' Create and fill DataSet
Dim dsAs New DataSet()
da.Fill(ds, "Employees")
Dim dv As DataView = ds.Tables("Employees").DefaultView
' Add DataView Event Handlers
AddHandler dv.ListChanged, AddressOf OnListChanged
' Add a row to the DataView
dv.AllowEdit = True
Dim rwAs DataRowView = dv.AddNew()
rw.BeginEdit()
rw("FirstName") ="FName"
rw("LastName") ="LName"
rw.EndEdit()
' Remove a row from the DataView
If dv.Count > 0Then
dv.Delete(0)
dv(0).Row.AcceptChanges()
End If
' Close the connection
conn.Close()
End Sub