VB 用Insert into 提示错误,希望高手指导一下

来源:百度知道 编辑:UC知道 时间:2024/05/26 19:48:15
temp = "insert into temp (ID,Rank,password) value (" + Text1.Text + "," + "'" + password("Rank") + "'" + "," + "'" + Text2.Text + "'" + ")"
conn.Execute (temp)
执行时提示insert into 语句错误,希望高手给与指导,谢谢
ID字段在Access数据库中为数字类型(长整型)
Rank和password 字段均为文本类型
NOVAWU你好,尝试了你的办法还是提示错误啊,内容如下:
实时错误'-2147217900 (80040e14)'
INSERT INTO 语句的语法错误
有没有其他办法了啊,帮忙想一下,谢谢了,解决了我会加分的

temp = "insert into temp ([ID],Rank,[password]) value (" + Text1.Text + "," + "'" + password("Rank") + "'" + "," + "'" + Text2.Text + "'" + ")"

ID和PASSWORD都是关键字,在ACCESS和SQL 2000中都要使用[] 引起来。

剩下的应该是楼下这位兄弟说的。value应该是values吧!

value应该是values吧!