这段ASP代码有什么错误
function check(userid,userkey)dim conn,param,rs
set conn=server.createobject("adodb.connection") '创建数据库连接对象conn
param="driver={microsoft access driver (*.mdb)}"
conn.open param & ";dbq=" & server.mappath("dxinfo1.mdb") '用指定的数据库驱动程序打开数据库,并指定数据路径
Sql="select * from userinfo where userid='@userid' and"
Sql=Sql+" userkey='@userkey' and zt=1"
sql1="selsct * from userinfo where userid='@userid' and upkey=1"
strsql="update userinfo set userkey='@userkey' where userid='@userid'"
set rs=conn.execute(sql)
set rs1=conn.execute(sql1)
if rs.eof then
check=false
elseif rs1.hasrows then
set rs=conn.execute(strsql)
check=true
elseif rs1.eof then
check=false
else
check=true
end if
end function
%>
Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e14'
[Microsoft][ODBC Microsoft Access Driver] 无效的 SQL语句;期待 'DELETE'、'INSERT'、'PROCEDURE'、'SELECT'、或 'UPDATE'。
/bxinfo/chk.asp,行 18
追问:可以的 我之前测试了set rs1=conn.execute(sql1)
sql1="selsct * from userinfo where userid='@userid' and upkey=1"
就这句会出错