帮我看看有什么错误吧,急
<%
dim conn
dim connstr
'dim db:db="db/PW_SYS_Data.mdb" '设定数据名称
dim dbset:setdb = 2 '设定连接类型
Set conn = Server.CreateObject("ADODB.Connection")
select case setdb
case "1"
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(""&db&"")
case "2"
connstr="DBQ="+server.mappath("db/PW_SYS_Data.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)}"
'connstr="driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath(""&db&"")
case "3"
connstr="driver={SQL Server};server=localhost;UID=sa;PWD=123;database=PW_SYS_data"
case else
connstr= "Dns=PW_SYS_Data"
end select
if err.number<>0 then
err.clear
set conn=nothing
response.write "数据库连接出错!"
Response.End
else
conn.open connstr
if err then
err.clear
set conn=nothing
response.write "数据库连接出错!"
Response.End
end if
end if
sub CloseConn()
conn.close
set conn=nothing
end sub
%>
提示:
Microsoft OLE DB Provider for ODBC Drivers 错误 '8007000e'
[Microsoft][ODBC Microsoft Access Driver]常见错误 不能打开注册表关键字 'Temporary (volatile) Jet DSN for process 0x768 Thread 0x1158 DBC 0x3d04804 Jet'。
/jx/Include/conn.asp,行 26
这是第26行:conn.open connstr