急!在线等待!数据库高手请进!
看看我的代码:
checkin.asp 登陆叶面!
========================================================================
<html>
<% @ language=vbscript %>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>
<body>
<% uname=Request.form("name")
upwd=request.form("pwd")
nowtime=date() & now()
uip=request.servervariables("remote_host")
set rs=server.createobject("adodb.recordset")
dsnstr="dsn=bbsdb;uid=sa"
sqlstr="select * from users where name='"&uname&"'and pwd='"&upwd&"'"
rs.open sqlstr,dsnstr,3,2
if rs.eof then
session("loginflag")=false
rs.Close
set rs=nothing
responese.redirect "loginfalse.htm"
else
logins=rs("logins")
session("loginflag")=true
session("name")=uname
session("ip")=uip
rs("lasttime")=nowtime
rs("lastip")=uip
rs("logins")=logins+1
rs.Update
rs.Close
set rs=nothing
response.redirect "more.asp"
end if
%>
</P>
</body>
</html>
========================================================================
错误:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC 驱动程序管理器] 未发现数据源名称并且未指定默认驱动程序
/lhd/checkin.asp, line 22
另外,我的数据库是bbsdb.mdb ,已经指定了驱动程序,添加了odbc数据源!
怎么查找错误?以及怎么调试?
用frontpage or dreamwaver or frontpage 宏脚本编辑器!
感谢!