Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim str As String
Dim cmd As OleDb.OleDbCommand
Dim icount As Integer
Dim conn As OleDb.OleDbConnection
Try
conn = GetConnection()
conn.Open()
str = “insert into address values(” & CInt(TextBox1.Text) & “,’” & TextBox2.Text & “‘,’” & TextBox3.Text & “‘,’” & TextBox4.Text & “‘,’” & TextBox5.Text & “‘)”
’string stores the command and CInt is used to convert number to string
cmd = New OleDb.OleDbCommand(str, conn)
icount = cmd.ExecuteNonQuery
MessageBox.Show(“No of row inserted:” & icount)
Catch ex As Exception
MsgBox(“Exception from insert:” & ex.ToString())
End Try
conn.Close()
End Sub
Public Function GetConnection() As OleDb.OleDbConnection
‘return a new connection to the database
Return New OleDb.OleDbConnection(“Provider=Microsoft.Jet.OleDb.4.0;data source=C:test.mdb;”)
End Function


Thank You
Cialis [url=http://ball.tcnj.edu/pols291/_disc2/00008cc5.htm]Cialis[/url]
hhgfhghhghgh