你现在还在用odbc啊
你用
on error resume next
set conn=Server.CreateObject("Adodb.Connection")
connstr="Provider=Microsoft.Jet.Oledb.4.0;Data Source="&Server.Mappath("数据库相对路径")&""
'清除数据库链接错误
if err then
err.clear
else
conn.open connstr
if err then
err.clear
end if
end if
这个链接方法比较普遍吧