asp与access连接问题
asp与access连接问题
dim connset conn=server.createobject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("database/db1.mdb")
dim dsql
dsql="select * from baseInformation where id is null"
dim recordset1
set recordset1=server.CreateObject("ADODB.Recordset")
recordset1.open dsql,conn,1,3
dim inputName
inputName =request.Form("userName")
dim inputPassword
inputPassword=request.Form("password")
dim selectPassword
selectPassword ="select * from baseInformation where name='"&inputName&"'"
set recordset1=conn.Execute(selectPassword)
if recordset1.eof then
response.write "用户名或密码不能为空!!! <br><br>"
elseif recordset1(password)=inputPassword then Response.Redirect("logSuccess.asp")
else
response.write "用户名或密码错误!!! <br><br>"
end if
提示
ADODB.Recordset 错误 '800a0cc1'
项目在所需的名称或序数中未被发现。
/log.asp,行40
elseif recordset1(password)=inputPassword then Response.Redirect("logSuccess.asp")
就是这句的错误
[此贴子已经被作者于2007-5-27 22:09:46编辑过]