| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 876 人关注过本帖
标题:是什么原因产生以下错误提示
只看楼主 加入收藏
nbsyf
Rank: 1
等 级:新手上路
帖 子:382
专家分:0
注 册:2006-7-31
结帖率:90.7%
收藏
已结贴  问题点数:20 回复次数:9 
是什么原因产生以下错误提示
请教是什么原因使以下index.asp在用Dreamweraver编辑运行时产生错误提示:“[Microsoft]“[ODBC Microsoft Access Driver] 'Temporary (volatile) Jet DSN for process 0x838 Thread 0xdc8 DBC 0x1865034 Jet”
<!-- #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()    ''清除相关的变量对象
%>
搜索更多相关主题的帖子: 提示 
2010-08-06 14:44
gupiao175
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:40
帖 子:1787
专家分:7527
注 册:2007-6-27
收藏
得分:4 
你用的DSN连接?

没看到你的连接数据库代码呢?

Q:1428196631,百度:开发地 即可找到我,有事请留言!
2010-08-06 15:52
nbsyf
Rank: 1
等 级:新手上路
帖 子:382
专家分:0
注 册:2006-7-31
收藏
得分:0 
index.asp中句<!-- #include file="include/inc_uiconfig.asp" -->内inc_uiconfig.asp内容如下:其中句conn_dbpath="/database/web_syssource.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-06 17:34
nbsyf
Rank: 1
等 级:新手上路
帖 子:382
专家分:0
注 册:2006-7-31
收藏
得分:0 
我也奇怪在inc_uiconfig.asp内只指出ACCESS数据库的地址conn_dbpath="/database/web_syssource.asp"而没有连接数据库的代码,请教我应该增加那些代码才能连接上数据库。
2010-08-07 06:05
hams
Rank: 12Rank: 12Rank: 12
等 级:贵宾
威 望:18
帖 子:912
专家分:3670
注 册:2008-7-30
收藏
得分:4 

俺不高手,俺也是来学习的。
俺的意见不一定就对,当你不认同时请点忽视按钮。
当走到十字路口不知该如何走时,可在论坛问下路,但你若希望别人能一路把你送到目的地,显然是不现实的,因为别人也有自己要走的路。
2010-08-07 10:08
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
收藏
得分:4 
<!-- #include file="inc_conndb.asp" -->
这个文件里写了什么?
2010-08-07 15:01
nbsyf
Rank: 1
等 级:新手上路
帖 子:382
专家分:0
注 册:2006-7-31
收藏
得分:0 
<!-- #include file="inc_conndb.asp" -->
这个文件内容如二
<%

class class_conndb
    public conn_str,conn_ostate
   
    ''对象初始化
    private sub class_initialize()
        dim sqldb_name,sql_password,sql_username,sql_servername,db_path
        ''dbType等于"1"时表示引用SQL数据库,否则等于"0"时引用Access数据库
        ''sql_username、sql_password应在网站设置中定义
        if dbType=1 then
            sql_servername="(local)"
            sqldb_name="web_sys"
            sql_username="sa"
            sql_password=""
            conn_str="Provider = Sqloledb; User ID = " & sql_username & "; Password = " & sql_password & "; Initial Catalog = " & sqldb_name & "; Data Source = " & sql_servername & ";"
            sql_nowstring="getdate()"
        else
            db_path=conn_dbpath
            ''conn_str="Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath(db_path)
            conn_str="Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath(db_path)
            sql_nowstring="now()"
        end if
        set conn_obj=server.createobject("adodb.connection")
        set rs_obj=server.createobject("adodb.recordset")
    end sub
   
    ''开始链接数据库并打开
    sub conn_open()
        on error resume next
        conn_obj.open conn_str
        if err.number<>0 then    ''if err then
            set conn_obj = nothing
            ''response.write "插件数据库连接出错,请检查连接字串。"
            response.write err.description
            err.clear
            response.end
            exit sub
        end if
        conn_ostate=true  ''当前数据库打开状态
    end sub   
   
    ''执行SQL语句并返回值
    function exec_sql(cmdText,cmdType)
        if conn_ostate=false then call conn_open()
        on error resume next
        select case cmdType
        case 0
            conn_obj.execute(cmdText)
        case else
            if int(cmdType)<0 then
                exit function
            end if
            set exec_sql=conn_obj.execute(cmdText)
        end select
        if err.number<>0 then
            ''response.write cmdText
            response.write "<font class=""red_color"">&nbsp;&nbsp;Sql Execute Code String Error(Table Name or Field Name etc. Others) &nbsp;!<br />&nbsp;&nbsp;" & err.description & "<br /></font>"
            err.clear
            response.end
        end if
    end function
   
    ''赋值相关的数据集对象
    function set_rsobj(old_rsobj)
        dim new_rsobj,rs_dllobj
        rs_dllobj="adodb.recordset"
        set new_rsobj=old_rsobj
        if (new_rsobj is nothing) then
            set new_rsobj=server.createobject(rs_dllobj)
        end if
        set set_rsobj=new_rsobj
    end function
   
    ''释放对象中的成员
    sub conn_close()
        if not(rs_obj is nothing) then
            set rs_obj=nothing
        end if
        if not(conn_obj is nothing) then
            set conn_obj=nothing
        end if
    end sub

end class
%>
2010-08-07 20:52
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
收藏
得分:0 
    private sub class_initialize()
        dim sqldb_name,sql_password,sql_username,sql_servername,db_path
        ''dbType等于"1"时表示引用SQL数据库,否则等于"0"时引用Access数据库
        ''sql_username、sql_password应在网站设置中定义
        if dbType=1 then
            sql_servername="(local)"
            sqldb_name="web_sys"
            sql_username="sa"
            sql_password=""
            conn_str="Provider = Sqloledb; User ID = " & sql_username & "; Password = " & sql_password & "; Initial Catalog = " & sqldb_name & "; Data Source = " & sql_servername & ";"
            sql_nowstring="getdate()"
        else
            db_path=conn_dbpath
            ''conn_str="Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath(db_path)
            conn_str="Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath(db_path)
            sql_nowstring="now()"
        end if
        set conn_obj=server.createobject("adodb.connection")
        set rs_obj=server.createobject("adodb.recordset")
    end sub
连接字符串可能有问题
2010-08-08 14:36
nbsyf
Rank: 1
等 级:新手上路
帖 子:382
专家分:0
注 册:2006-7-31
收藏
得分:0 
请教那个连接字符串可能有问题。(本程序中用的是ACCESS数据库("/database/web_syssource.asp")
是而不是SQLSERVER数据库)
2010-08-08 17:14
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
收藏
得分:0 
conn_str="Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath(db_path)
'conn_str="Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath(db_path)
换一组连接字符串试试
2010-08-08 17:55
快速回复:是什么原因产生以下错误提示
数据加载中...
 
   



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

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