Private Sub btnInsert_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnInsert.Click
Dim cn As New SqlConnection("Data Source=Your server address;Initial Catalog=YourDatabase;User Id=YourUsername;Password=YourPassword;")
Dim cmd As New SqlCommand("Your insert query", cn)
cn.Open()
cmd.ExecuteNonQuery()
cn.Close()
End Sub