一个简单问题??

vbzc 2002-07-21 09:04:39
调试程序时出现以下信息:
ADODB.Connection 错误 '800a0e7a'

未找到提供者。可能未被正确安装。

/wlfh/stu/globals.asp, 行5
这该怎么办??
...全文
35 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
JavaCoffee 2002-07-21
  • 打赏
  • 举报
回复
问题应该就出在这句话:
“schooldb.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("schoolmate.mdb")”
看来是驱动程序的问题了。建议你用下面的方法试试:

ASP连接Access数据库的4种方法
1.
set dbconnection=Server.CREATEOBJECT("ADODB.CONNECTION")
DBPath = Server.MapPath("customer.mdb")
dbconnection.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
SQL="select * from auth where id='" & user_id &"'"
SET uplist=dbconnection.EXECUTE(SQL)
2.
set dbconnection=Server.CreateObject("ADODB.Connection")
DBPath = Server.MapPath("customer.mdb")
dbconnection.Open "provider=microsoft.jet.oledb.4.0;data source="&dbpath
SQL="select * from auth where id='" & user_id &"'"
SET uplist=dbconnection.EXECUTE(SQL)
3.
DBPath = Server.MapPath("customer.mdb")
set session("rs")=Server.CreateObject("ADODB.Recordset")
' rs=Server.CreateObject("ADODB.Recordset")
connstr="provider=microsoft.jet.oledb.4.0;data source="&dbpath
SQL="select * from auth where id='" & user_id &"'"
session("rs").Open sql,connstr,1,3
4.
建odbc源xxx
set conn=server.createobject("Adodb.connection")
conn.open "DSN=xxx;UID=;PWD=;Database=customer

你现在用的是第一种连接方法,建议你用一下第2种或者第3种试试。

祝:好运!
vbzc 2002-07-21
  • 打赏
  • 举报
回复
<%
'全局数据库参数.
set schooldb = server.createobject("ADODB.connection")
schooldb.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("schoolmate.mdb")

DBParams=schooldb
'生成HTML脚本时美化生成结果时,自动带上回车换行符.
CRLF = Chr(13)&Chr(10)

Function PassWordOK(Byval UserID,Password) 'PasswordOK(UserID,PassWord)
passwordok=true
Set PWrs = Server.CreateObject("ADODB.Recordset")
SQL = "select * from UserInfo where UserID='"&UserID&"'"
PWrs.Open SQL,DBParams
if not PWrs.eof then
if PWrs("userpassword")=password then
passwordok=true
else
passwordok=false
end if
else
passwordok=false
end if
if len(password)>8 or not instr(password,"or")=0 then
passwordok=false
end if
PWrs.Close
set PWrs = nothing
End Function
%>
vbzc 2002-07-21
  • 打赏
  • 举报
回复
好的
青蛙 2002-07-21
  • 打赏
  • 举报
回复
楼上的朋友说得有道理,为何不试一下呢???
JavaCoffee 2002-07-21
  • 打赏
  • 举报
回复
把“golbals.asp”中的详细代码贴出来,大家一起看看。
看提示信息,好象是在建立数据库连接时没有找到数据库连接的相关驱动程序。

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧