我該如何結束這個SQL UPDATE語句?調試器告訴我,SQL UPDATE where子句')'
字符串常量必須用雙引號
結束,並在某些時候在那裏,你從交換機是hiighlighting的WHERE子句"', con)
cmd = New SqlCommand("UPDATE PersonsA SET(Members_ID='" & midtxt.Text & "'Gamer_Tag='" & gttxt.Text & "'Screenname='" & sntxt.Text & "'First_Name='" & fntxt.Text & "'Last_Name='" & lntxt.Text & "'DoB='" & dobtxt.Text & "'E_Mail_Address='" & emailtxt.Text & "'Position='" & teamptxt.Text & "'UG_Studio'" & ugptxt.Text & "'Cautions='" & ugctxt.Text & "'Record='" & recordtxt.Text & "'Event_Attendance='" & eventatxt.Text & "'Members_Status='" & memberstatcombo.Text & "'GTA_V_Crew_Member='" & gtavcrewmembercombo.Text & "'Games_Owned='" & gamesownedtxt.Text & "'Rep_Group='" & RepGroupcombo.Text & "'WHERE Members_ID='" & midtxt.Text & "', con)
添加雙引號單引號之後,並添加逗號項目 – Heslacher
之間。如果你使用參數化查詢這種錯誤是非常不可能的。 – Steve
把''',con)'改成''''「,con)' - 在你的問題中語法高亮可以很容易地識別 – Basic