Imports System.Data.OleDb Partial Public Class _Default Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load End Sub Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click Dim strConnection As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\sim\Documents\mydb.accdb" Dim objConnection As New OleDbConnection(strConnection) objConnection.Open() Dim command As New OleDbCommand command.Connection = objConnection Dim a As Integer a = CInt(TextBox1.Text) command.CommandText = "Insert into Table1 (Field1,Field2) values (" & a & ",9)" command.ExecuteNonQuery() End Sub End Class