我得到了一个"语法缺失运营商" Visual Basic中的错误。
这是我的代码:
cmd.Connection = conn
'add data to the database
cmd.CommandText = "INSERT INTO [STUDENT REGISTRATION REPORT]([StudentID],[FirstName],[LastName],[Course],[YearLevel],[Department],[Age],[Gender],[Cleaning],[CavityFilling],[Xray],[Flouride],[RootCanal])" & _
"VALUES(" & studentid.Text & "','" & firstname.Text & "','" & lastname.Text & "','" & course.Text & "','" & yearlevel.Text & "','" & department.Text & "','" & _ age.Text & "','" & gender.Text & "','" & cleaning.Checked & "','" & cavityfilling.Checked & "','" & xray.Checked & "','" & flouride.Checked & "','" & _
rootcanal.Checked & "')"
cmd.ExecuteNonQuery()
'close connection
conn.Close()
End Sub