注册 登录
编程论坛 ASP技术论坛

网站首页显示Microsoft VBScript 编译器错误 错误 '800a03ea'

cg3327 发布于 2013-01-16 11:58, 526 次点击
求教
网站首页上显示Microsoft VBScript 编译器错误 错误 '800a03ea'

语法错误

/LM/W3SVC/1/Root/global.asa,行 60

Microsoft JET Database Engine 错误 '80004005'

'E:\cj\chujian\data\data.mdb'不是一个有效的路径。 确定路径名称拼写是否正确,以及是否连接到文件存放的服务器。

chujian/conn.asp,行 27



[ 本帖最后由 cg3327 于 2013-1-16 12:27 编辑 ]
3 回复
#2
cg33272013-01-16 12:01
<!--#include file="sql.asp"-->
 <%   response.buffer=true   %>
<%
    dim conn
    dim connstr
    dim db:db="data/data.mdb"     '设定数据名称
    dim dbset:setdb =1        '设定连接类型

    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="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 %>
#3
cg33272013-01-16 12:01

 真诚 求教
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 %>
#4
cg33272013-01-16 12:04
网站首页上出现Microsoft VBScript 编译器错误 错误 '800a03ea'

语法错误

/LM/W3SVC/1/Root/global.asa,行 60

1