Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
Dim myConn As OleDbConnection = New OleDbConnection()
myConn.ConnectionString = ConnString
myConn.Open()
Dim strInsert As String = "insert into Table1 (时间,温度,入射功率,反射功率 ) values('" + Label1.Text + "','" + Label2.Text + "','" + Label3.Text + "','" + Label4.Text + "')"
Dim cmdInsert As OleDbCommand = New OleDbCommand(strInsert, myConn)
cmdInsert.ExecuteNonQuery()
MsgBox("添加成功!")
Catch ex As Exception
MsgBox("添加失败")
End Try
End Sub
End Class