CurrentDB.Execute "UPDATE SET..." . |
If j <> .Fields(i) Or IsNull(j) <> IsNull(.Fields(i)) Then Log 6, !, " " & .Fields(i).Name & " " & .Fields(i) & " " & j & ". ." str = j.Value If VarType(j.Value) = vbString Or VarType(j.Value) = vbDate Then str = "'" & str & "'" ' , ssql = "UPDATE tblUPS SET tblUPS.[" & .Fields(i).Name & "] = " & str & ", tblUPS.[ ] = '" & Date & "' WHERE tblUPS.[] = " & rst.Fields("") & ";" Debug.Print ssql CurrentDb.Execute ssql Exit For Else Exit For End If
Debug.Print |
---|
UPDATE tblUPS SET tblUPS.[SNMP] = False, tblUPS.[ ] = '28.01.2015' WHERE tblUPS.[] = 1348; |
Private Sub test() CurrentDb.Execute "UPDATE tblUPS SET tblUPS.[SNMP] = False, tblUPS.[ ] = '28.01.2015' WHERE tblUPS.[] = 1348;" End Sub
http://www.sql.ru/forum/1139626/currentdb-execute-update-set-ne-rabotaet