[Microsoft][ODBC Microsoft Access Driver] 标准表达式中数据类型不匹配
问题如上:代码在下:<%
cont="driver={microsoft access driver (*.mdb)};dbq= " & server.mappath("login.mdb")
set con=server.createobject("adodb.connection")
con.open cont
set rs=server.createobject("adodb.recordset")
action=trim(request("action"))
username=trim(request("username"))
password=trim(request("password"))
if action="action" then check=true
if len(username)<1 then check=false
if len(password)<1 then check=false
if check then
query="select password from guest where admin="
query=query&username&""
rs.open query,con
if(not rs.eof) then
if(rs("password")=password) then
check=true
else
check=false
end if
else
check=false
end if
if check then
response.wirte "登陆成功"
else
response.write "登陆失败"
end if
else
%>
<html>
<head>
</head>
<body>
<body>
<form action="1.asp" method="post">
<input type="hidden" name="action" value="action">
<table width="200" border="1">
<tr>
<th width="65" scope="row">用户名:</th>
<td colspan="2"><label>
<input name="username" type="text" size="5">
</label></td>
</tr>
<tr>
<th scope="row">登陆:</th>
<td colspan="2"><label>
<input name="password" type="text" size="5">
</label></td>
</tr>
<tr>
<th scope="row"><label>
<input type="submit" name="Submit" value="登陆">
</label></th>
<td width="53"><label>
<input type="submit" name="Submit2" value="取消">
</label></td>
<td width="60"><label>
<input type="submit" name="Submit3" value="注册">
</label></td>
</tr>
</table>
</body>
</html>
<% end if%>
其中admin,password是文本