Imports System.Data.OleDb
Public Class Form1
Dim objDA As OleDbDataAdapter
Dim objTable As DataTable
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
objDA = New OleDbDataAdapter("Select * From snippets", "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Application.StartupPath & "\Snippets.mdb")
objTable = New DataTable
objDA.Fill(objTable)
Dim commandBuilder As New OleDbCommandBuilder(objDA)
Dim objBS As New BindingSource
objBS.DataSource = objTable
BindingNavigator1.BindingSource = objBS
DataGridView1.DataSource = objBS
End Sub
Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click
objDA.Update(objTable)
MsgBox("updated.")
End Sub
End Class