我在连接MS Access数据库时遇到问题。我正在使用 IIS7。我收到此错误:
Microsoft ODBC 驱动程序的 OLE DB 提供程序错误"80004005" [Microsoft][ODBC 驱动程序管理器]找不到数据源名称,也没有 指定的默认驱动程序
这是我的数据库连接:
<%
dim rs,con,sql
SET con=Server.CreateObject("ADODB.Connection")
SET rs=Server.CreateObject("ADODB.Recordset")
con.open "DRIVER={Microsoft Access DRIVER (*.mdb)}; DBQ=" & Server.MapPath("crs.mdb") & ""
sql="SELECT * FROM tblAccount WHERE fldUsername='"& request.form("txtuser") &"' AND fldPassword='"& request.form("txtpass") &"';"
rs.CursorType=2
rs.Open sql, con
if rs.bof then
response.write "WRONG"
else
response.write "CORRECT"
end if
rs.Close
SET rs=Nothing
SET con=Nothing
%>
我的单位是Windows和终极64位。
您是否尝试过在 IIS 中启用 32 位应用程序支持?
http://help.webcontrolcenter.com/KB/a1114/how-to-enable-32-bit-application-pool-iis-7-dedicatedvps.aspx