SQL-syntax error
What is wrong with this SQL-syntax?
INSERT INTO chatt (user, msg, ip) VALUES('testUser', 'testMsg', '81.235.154.103')
The server is running some IIS with an unknown SQL version, but the files has to be in access 2000-format. The fields i've got are id, user, msg, ip, datum. 1st one is a counter, last one is a date/time and the rest are text f开发者_JAVA百科ields. How do i insert into those three fields?
user
may be a reserved word. Try putting it in brackets [user]
Without the actual error message we can't really tell, but two obvious things jump out:
user
is a reserved word; enclose it in square braces:[user]
- Your
datum
field may benot null
, which means you need to provide a value for it in your statement.
精彩评论