SQL查询出错,,请指点
rs3.Open "select * from sky_user where username =" & user_name, Conn3, 1, 3
rs3("ErrLond") = "Over"
rs3.Update
rs3.Close
提示错误“至少有一个未被指定值”
[解决办法]
rs3.Open "select * from sky_user where username =" & user_name &"", Conn3, 1, 3
if rs3.recordcount>0 then
rs3("ErrLond") = "Over"
rs3.Update
end if
rs3.Close
[解决办法]
'username为字符型,则这样:
rs3.Open "select * from sky_user where username ='" & user_name &"'", Conn3, 1, 3
if rs3.recordcount>0 then
rs3("ErrLond") = "Over"
rs3.Update
end if
rs3.Close
[解决办法]
rs3.Open "select * from sky_user where username ='" & user_name & "'", Conn3, 1, 3
[解决办法]
rs3.Open "select * from sky_user where username='" & user_name & "'", Conn3, 1, 3