SQL UPDATE语法错误问题

时间:2017-12-08 09:01:28

标签: sql ms-access access-vba ms-access-2010

我有一些SQL,我收到语法错误,但无法解决原因:

守则:

CurrentDb.Execute "UPDATE [MS Access;pwd=" & strPassword & ";database=" & DBpath & "\" & DBnameVoice & "].[" & tblhistoric & "] " & _
         "SET NudgeSent = '" & SendNudge & "' " & _
         "WHERE [ID] = '" & UID & "'"

为什么我感到困惑: 我有完全相同的代码,但更新不同的列,它工作正常,我错过了什么?

收到错误:

UPDATE语句中的语法错误

类似的代码我的确有效:

CurrentDb.Execute "UPDATE [MS Access;pwd=" & strPassword & ";database=" & DBpath & "\" & DBnameVoice & "].[" & tblhistoric & "] " & _
         "SET AllocatedTo = '" & Allocateto & "' " & _
         "WHERE [ID] = '" & UID & "'"

0 个答案:

没有答案