| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 960 人关注过本帖
标题:请教是什么原因使ASP+Access程序运行出错
只看楼主 加入收藏
nbsyf
Rank: 1
等 级:新手上路
帖 子:382
专家分:0
注 册:2006-7-31
结帖率:90.7%
收藏
已结贴  问题点数:20 回复次数:4 
请教是什么原因使ASP+Access程序运行出错
index.asp程序代码如下(我用的是Dreamweaver)
<!-- #include file="include/inc_uiconfig.asp" -->
<%
dim getlan_var,edition_var1,edition_var2,edition_var3,editionicon_temp,default_edition,edition_list,is_cover,goto_pageurl
is_cover=0
goto_pageurl="/index.htm"
getlan_var=var_null(request.querystring("lan"))
editionicon_temp="/images/lan_ico/{$languagetopic}.gif"
if getlan_var<>"" then
    if instr(getlan_var,"_")>0 then
        edition_list=split(getlan_var,"_")
        if ubound(edition_list)>=1 then
            edition_var1=edition_list(1)
            edition_var2=edition_list(0)
            ''edition_var3=replace(editionicon_temp,"{$languagetopic}",edition_list(0))
        end if
        if isarray(edition_list) then erase edition_list
    else
        edition_var1=edition_id
        edition_var2=edition_value
        ''edition_var3=replace(editionicon_temp,"{$languagetopic}",edition_value)
    end if
else
    edition_var1=edition_id
    edition_var2=edition_value
    ''edition_var3=replace(editionicon_temp,"{$languagetopic}",edition_value)
    if isarray(editions_idlist) and var_null(indexEditionVar)<>"" then
        default_edition=var_null(indexEditionVar)
        if instr(default_edition,"|")>0 then
            edition_list=split(default_edition,"|")
            if ubound(edition_list)>=2 then
                edition_var1=edition_list(0)
                edition_var2=edition_list(1)
                ''edition_var3=edition_list(2)
            end if
            if isarray(edition_list) then erase edition_list
        end if
    end if
   
    ''session(webCookies&"_veiwedition")=""
    ''判断是否开启封面功能
    ''sql_cmd="select top 1 * from T_SysCover"
    sql_cmd="select top 1 * from T_SysCover where editionId=" & edition_var1
    set rs_obj=web_dbobj.exec_sql(sql_cmd,1)
    if not rs_obj.eof then
        is_cover=rs_obj("coverSwitch")
    end if
    rs_obj.close
    ''if var_null(session(webCookies&"_veiwedition"))="" then
        if int(is_cover)=1 then
            goto_pageurl="/cover.htm"
        end if
    ''end if
end if
''session(webCookies&"_veiwedition")=edition_var1
call format_redirect(edition_var2 & goto_pageurl)
call release_webobj()    ''清除相关的变量对象
%>
此程序不能正常运行,运行时屏幕出现如下错误提示
[Microsoft][ODBC Microsoft Access Driver]甯歌?閿欒? 涓嶈兘鎵撳紑娉ㄥ唽琛ㄥ叧閿?瓧 'Temporary (volatile) Jet DSN for process 0x3e4 Thread 0xf44 DBC 0x1867034 Jet'銆
请教在什么地方出问题了,使程序无法正常运行。
搜索更多相关主题的帖子: Access ASP 运行 
2010-08-03 05:15
nbsyf
Rank: 1
等 级:新手上路
帖 子:382
专家分:0
注 册:2006-7-31
收藏
得分:0 
我用的是Win XP系统,装了IIS和DREAMWEAVER和Office没有装SQLSERVER。
2010-08-03 05:50
cnfarer
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:179
帖 子:3330
专家分:21157
注 册:2010-1-19
收藏
得分:14 
得看看include/inc_uiconfig.asp.估计是数据库连接问题

★★★★★为人民服务★★★★★
2010-08-03 06:31
nbsyf
Rank: 1
等 级:新手上路
帖 子:382
专家分:0
注 册:2006-7-31
收藏
得分:0 
include/inc_uiconfig.asp的代码如下:
<!-- #include file="inc_global.asp" -->
<!-- #include file="inc_md5.asp" -->
<!-- #include file="inc_connxml.asp" -->
<!-- #include file="inc_conndb.asp" -->
<!-- #include file="inc_public.asp" -->
<!-- #include file="inc_common.asp" -->
<!-- #include file="inc_sysfile.asp" -->
<!-- #include file="inc_uieditor.asp" -->
<!-- #include file="inc_rsdata.asp" -->

<%
''前台引用
dim edition_id,edition_name,edition_value,edition_xmlobj,edition_xmlpath

''conn_dbpath="/database/web_syssource.mdb"
conn_dbpath="/database/web_syssource.asp"
upload_path="/upload/"
webconfig_xml="/config/web_config.xml"
''edition_xmlpath="/config/serviceConfig.xml"
edition_xmlpath="/config/languageConfig.xml"
dbType=0    ''等于"1"时表示引用SQL数据库,否则等于"0"时引用Access数据库
webStatus=1

set web_dbobj= new class_conndb

''网站基本信息读取
sql_cmd="select top 1 * from T_SysConfig"
if set_rsobjdata(sql_cmd)=true then
    existConfig=true
    dbType=rs_obj("webDbType")
    webStatus=rs_obj("webStatus")
    webOpenTime=rs_obj("webOpenTime")
    webCookies=rs_obj("webCookies")
    webAdminMail=rs_obj("webAdminMail")
    stopUserName=rs_obj("stopUserName")
    useForPass=rs_obj("useForPass")
    retainUserName=rs_obj("retainUserName")
    indexEditionVar=rs_obj("indexEditionVar")
    uploadDllType=rs_obj("uploadDllType")
    smtpWebServer=rs_obj("smtpWebServer")
    smtpWebUserMail=rs_obj("smtpWebUserMail")
    smtpWebUserPass=rs_obj("smtpWebUserPass")
end if
call set_closersobj(0)

session_for=webCookies

''if session(webCookies&"_veiwedition")<>"" then
''    edition_id=session(webCookies&"_veiwedition")
''    set session(webCookies&"_veiwedition")=nothing
''    session(webCookies&"_veiwedition")=edition_id
''else
''    session(webCookies&"_veiwedition")=1
''    edition_id=session(webCookies&"_veiwedition")
''end if

''--------版本进入判断开始-----------
set edition_xmlobj= new class_connxml
call edition_xmlobj.load_xmldoc(edition_xmlpath)
''call edition_xmlobj.load_xmltxt(edition_xmlpath)

dim editions_idlist,editions_titlist,editions_topiclist,languagekeyid,languagetopic,languagetitle
''languagekeyid=edition_xmlobj.getelem_value("languageconfig","languagekeyid")
''languagetopic=edition_xmlobj.getelem_value("languageconfig","languagetopic")
''languagetitle=edition_xmlobj.getelem_value("languageconfig","languagetitle")
languagekeyid=edition_xmlobj.getelem_value("","languagekeyid")
languagetopic=edition_xmlobj.getelem_value("","languagetopic")
languagetitle=edition_xmlobj.getelem_value("","languagetitle")
if instr(languagekeyid,"|")>0 then
    editions_idlist=split(languagekeyid,"|")
    editions_titlist=split(languagetitle,"|")
    editions_topiclist=split(languagetopic,"|")
else
    editions_idlist=languagekeyid
    editions_titlist=languagetitle
    editions_topiclist=languagetopic
end if

if var_null(edition_id)="" or int_true(edition_id)=false then
    ''默认的情况下的设置
    if isarray(editions_idlist) then
        edition_id=editions_idlist(0)
        edition_name=editions_titlist(0)
        edition_value=editions_topiclist(0)
    else
        edition_id=editions_idlist
        edition_name=editions_titlist
        edition_value=editions_topiclist
    end if
else
    ''读取对应的版本信息数据
    if isarray(editions_idlist) then
        for var_i=0 to ubound(editions_idlist)
            if edition_id=editions_idlist(var_i) then
                edition_name=editions_titlist(var_i)
                edition_value=editions_topiclist(var_i)
                exit for
            end if
        next
        if var_null(edition_name)="" then
            edition_id=editions_idlist(0)
            edition_name=editions_titlist(0)
            edition_value=editions_topiclist(0)
        end if
    else
        edition_id=editions_idlist
        edition_name=editions_titlist
        edition_value=editions_topiclist
    end if
end if
''--------版本进入判断结束-----------

''开始读取所选版本的相关全局信息
sql_cmd="select * from T_SysMainInfo where editionId=" & edition_id
if set_rsobjdata(sql_cmd)=true then
    webName=rs_obj("webName")
    webUrl=rs_obj("webSiteUrl")
    webWordKeys=rs_obj("webWordKeys")
    webDescription=rs_obj("webDescription")
    webAuthor=rs_obj("webAuthor")
    webCopyRight=rs_obj("webCopyRight")
end if
call set_closersobj(0)

''返回对应版本信息的参数
function get_editionid()
    dim the_editionvalue,thenow_pageurl,editionid_val
    thenow_pageurl=request.servervariables("http_referer")
    ''读取对应的版本信息数据
    if isarray(editions_idlist) then
        for var_i=0 to ubound(editions_idlist)
            the_editionvalue="/" & editions_topiclist(var_i) & "/"
            if instr(thenow_pageurl,the_editionvalue)>0 then
                editionid_val=editions_idlist(var_i)
                edition_value=editions_topiclist(var_i)
                exit for
            end if
        next
        if var_null(editionid_val)="" then
            editionid_val=editions_idlist(0)
            edition_value=editions_topiclist(0)
        end if
    else
        editionid_val=editions_idlist
        edition_value=editions_topiclist
    end if
''    if session(webCookies&"_veiwedition")<>"" then
''        
''    else
''        set session(webCookies&"_veiwedition")=nothing
''        session(webCookies&"_veiwedition")=editionid_val
''    end if
    get_editionid=editionid_val
end function

''判断进行是否将要记录点击数
function set_msortcounter(sm_indexvar,sm_dataid)
    dim sm_indexv_did,all_counterid,counterid_temp
    set_msortcounter=false
    sm_indexv_did=sm_dataid
    if int_true(sm_indexv_did)=true then
        all_counterid=session(webCookies&"_"&sm_indexvar)   
        counterid_temp="," & all_counterid & ","
        if instr(counterid_temp,"," & sm_indexv_did & ",")>0 then
            set_msortcounter=false
        else
            if var_null(all_counterid)="" then
                session(webCookies&"_"&sm_indexvar)=sm_indexv_did
            else
                session(webCookies&"_"&sm_indexvar)=all_counterid & "," & sm_indexv_did
            end if
            set_msortcounter=true
        end if
    end if
end function

''清空全局对象
sub release_webobj()
    call edition_xmlobj.xmldom_clear()
    set edition_xmlobj=nothing
    if isarray(editions_idlist) then erase editions_idlist
    if isarray(editions_titlist) then erase editions_titlist
    if isarray(editions_topiclist) then erase editions_topiclist
    call web_dbobj.conn_close()
    set web_dbobj=nothing
end sub

%>
2010-08-03 09:34
cnfarer
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:179
帖 子:3330
专家分:21157
注 册:2010-1-19
收藏
得分:0 
你调试一下,检查一下出错的行号,看看是数据库连接问题,还是SQL语句问题,然后,再做相应处理.

★★★★★为人民服务★★★★★
2010-08-10 15:45
快速回复:请教是什么原因使ASP+Access程序运行出错
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.029582 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved