数据类型不匹配sql="update test set libi='"&libi&"',question='"&question&"',a='"&a&"',b='"&b&"

来源:百度知道 编辑:UC知道 时间:2024/07/08 19:38:35
sql="update test set libi='"&libi&"',question='"&question&"',a='"&a&"',b='"&b&"',c='"&c&"',d='"&d&"',e='"&e&"',f='"&f&"',aa='"&aa&"',bb='"&bb&"',cc='"&cc&"',dd='"&dd&"',ee='"&ee&"',ff='"&ff&"' where id="+id
在这说明,aa,bb,cc,..为整型多谢大家

sql="update test set libi='" & libi & "',question='" & question & "',a='" & a & "',b='" & b & "',c='" & c & "',d='" & d & "',e='" & e & "',f='" & f & "',aa='" & aa & "',bb='" & bb & "',cc='" & cc & "',dd='" & dd & "',ee='" & ee & "',ff='" & ff & "' where id = " & id

最好在使用&时两边添上空格,因为有些情况下会认为&abc是16进制数的。

sql="update test set libi='"&libi&"',question='"&question&"',a='"&a&"',b='"&b&"',c='"&c&"',d='"&d&"',e='"&e&"',f='"&f&"',aa="&aa&",bb="&bb&",cc="&cc&",dd="&dd&",ee="&ee&",ff="&ff&" where id='"&id<