b*******r 发帖数: 6 | 1 土问题:
INSERT INTO MyTable (PriKey, Description) VALUES (user_input_key,
user_input_description)
被写成了:
INSERT INTO MyTable (PriKey, Description) VALUES
('user_input_key','user_input_description')
结果居然还是work,但就是如果user输入了,for example,"mark's",就会报错:
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing
operator) in query expression "mark's', '".
WHY?Thanks | qb 发帖数: 38 | 2 use double ' instead of ' mark's -> mark''s
【在 b*******r 的大作中提到】 : 土问题: : INSERT INTO MyTable (PriKey, Description) VALUES (user_input_key, : user_input_description) : 被写成了: : INSERT INTO MyTable (PriKey, Description) VALUES : ('user_input_key','user_input_description') : 结果居然还是work,但就是如果user输入了,for example,"mark's",就会报错: : [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing : operator) in query expression "mark's', '". : WHY?Thanks
|
|