我用vb6和access2000。
修改一条记录,例如这个表有三个字段,id,name和address,我执行update语句如下:
conn.execute "update table set name='" & text1.text & "',address='" text2.text "' where id=1"
其中text1.text 和text2.text不一定都有值,如果都有值就不会出现标题提示,如果有一个无就会出现“至少一个参数未指定值”,无法修改。
修改一条记录,例如这个表有三个字段,id,name和address,我执行update语句如下:
conn.execute "update table set name='" & text1.text & "',address='" text2.text "' where id=1"
其中text1.text 和text2.text不一定都有值,如果都有值就不会出现标题提示,如果有一个无就会出现“至少一个参数未指定值”,无法修改。
update table set [name]='" & text1.text & "',[address]='" text2.text "' where [id]=1"因为你的ID 是个关键字
--------------------------------
楼主把出错的原语句贴看看,上面的语句好象都没写完整,text2.text两边好象少了两个&符号