OleDbException未处理…UPDATE语句中的语法错误
Private Sub UpdateToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UpdateToolStripMenuItem.Click If MsgBox("Save Changes?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "WARNING") = MsgBoxResult.Yes Then
Dim oleDC As New OleDbCommand With oleDC .Connection = conn .CommandText = "UPDATE tblPatientsRecord SET Names='" & txtNames.Text & _ "',Licensenumber='" & txtLicensenumber.Text & _ "',Address='" & txtAddress.Text & _ "',Fullname='" & txtFullname.Text & _ "',Birthday='" & txtBase.Text &
"',Age='" & txtAge.Text & _ "',Country='" & cmbCountry.Text & "' WHERE PatientID='" & txtPatientID.Text & "'"
.ExecuteNonQuery()
MsgBox("Record Updated!", MsgBoxStyle.Information + MsgBoxStyle.OkOnly, "SUCCESS")
Disable()
Clear()
SaveToolStripMenuItem.Enabled = False
NewToolStripMenuItem.Enabled = True
LoadPatientsRecord()
getLastPatientID()
End With
End IfEnd Sub
牛魔王的故事
临摹微笑
随时随地看视频慕课网APP