2011-06-14 110 views
1

我寫了簡單的更新/插入語句,返回語法錯誤,我錯過了什麼?表名是筆記,字段備註是類型備忘錄,acaps是雙重備註。我的更新和插入語句的SQL語法錯誤

update notes set note='why is there a syntax error' where acaps=12345 
在我的INSERT語句

語法錯誤太多:

insert into notes (acaps,note,updated,userId) values (12345,'Why is there a syntax error',#6/13/2011 5:07:35 PM#,'BRSANDE') 

回答

2

您正試圖使用​​保留字:List of reserved words in Access 2002 and in later versions of Access

update [notes] 
set [note] = 'why is there a syntax error' 
where [acaps] = 12345 


insert into [notes] ([acaps], [note], [updated], [userId]) 
values (12345, 'Why is there a syntax error', #6/13/2011 5:07:35 PM#, 'BRSANDE') 
+0

好,我真的需要研究這些保留的關鍵字,我絆倒再起。謝謝! – DontFretBrett 2011-06-14 05:00:44