求助我的站报Microsoft OLE DB Provider for SQL Server '80004005'
程序威博多用户6.2在后台发布生成时出现下面错误!
Microsoft OLE DB Provider for SQL Server '80004005' ��ʱ���ont> /web_taginterface/Web_public.asp 218
请问这怎么解决呀?
<%
'商城系统发布函数
Function Web_Create_index(w_tplpath,w_save_path,w_filename)
conndb
set web_lab=new labelclass
if w_tplpath="" or isnull(w_tplpath)=true then
web_filecontent=web_lab.LabGetContent("模板文件不存在,请添加后重新生成","")
else
web_filecontent=web_lab.LabGetContent(getfilecontent(w_tplpath),"")
end if
if instr(web_filecontent,"[Web:Title]")>0 then
web_filecontent=replace(web_filecontent,"[Web:Title]",Web_C_webtitle)
end if
if instr(web_filecontent,"[Web:keyword]")>0 then
web_filecontent=replace(web_filecontent,"[Web:keyword]",getonevalue("web_webconfig","W_webkeyword","id=1"))
end if
if instr(web_filecontent,"[Web:Description]")>0 then
web_filecontent=replace(web_filecontent,"[Web:Description]",getonevalue("web_webconfig","W_webdescription","id=1"))
end if
check_sys_ajax="<script src='"&web_get_rootdir(web_c_setupfolder)&"pub/checksysopen.asp' language='javascript'></script>"
web_filecontent=web_filecontent&kft_getcode()
call save_file(web_filecontent,w_save_path&w_filename)
End Function
Function Get_Public_sql_head(tabname,Refresh_Type)
Get_Public_Sql_Head="Select top 1 * from "&tabname&" as A where "
End Function
Function Web_Create(w_sql,IsCookies)
conndb
set web_rs=conn.execute(w_sql)
if web_rs.eof then
web_create=false
else
web_keyID=Request.Cookies("Web_IDFlag")
web_keyID=web_rs(web_keyID)
set web_lab=new labelclass
web_lab.w_key_id=web_rs("id")
If IsCookies Then
Response.Cookies("Web_FirstID") = web_RS("ID")
End If
v_rootdir=Web_Get_RootDir(Web_C_setupfolder)
w_folderpath=Get_File_Save_Path(v_rootdir,web_rs)
v_tplpath=Get_File_Template_Path(v_rootdir,web_rs)
if v_tplpath="" then
lab_outcontent="模板文件不存在,请添加模板后重新生成!"
else
lab_outcontent=web_lab.LabGetContent(getfilecontent(v_tplpath),web_keyID)
end if
lab_outcontent=web_get_keyword(lab_outcontent,"[Web:Title]",web_rs(web_var_Title))
if web_var_keyword<>"-1no" then
lab_outcontent=web_get_keyword(lab_outcontent,"[Web:keyword]",web_rs(web_var_keyword))
lab_outcontent=web_get_keyword(lab_outcontent,"[Web:Description]",web_rs(web_var_Description))
end if
rem 提取分页标志
Set w_REG_Page = New RegExp
w_REG_Page.Pattern= "\[Web\:PageBegin\][^\0]*\[Web\:PageEnd\]"
w_REG_Page.IgnoreCase = True
w_REG_Page.Global = True
PageFlag=w_REG_Page.test(lab_outcontent)
Set Matches = w_REG_Page.Execute(lab_outcontent)
if PageFlag=True then
for each match in matches
pagecontent=match.value
Next
pagearr=split(pagecontent,"{|}")
for i=0 to ubound(pagearr)
if i=0 then
w_folderpath_tmp=w_folderpath
else
w_folderpath_tmp=replace(w_folderpath,".html","_"&i+1&".html")
end if
tmpstr=lab_outcontent
w_filename_tmp=replace(w_folderpath,".html","")
lab_outcontent_tmp=replace(lab_outcontent,pagecontent,pagearr(i))
lab_outcontent_tmp=Web_Get_PageFN(lab_outcontent_tmp,ubound(pagearr)+1,i+1,w_filename_tmp,"html")
lab_outcontent_tmp=replace(lab_outcontent_tmp,"[Web:PageBegin]","")
lab_outcontent_tmp=replace(lab_outcontent_tmp,"[Web:PageEnd]","")
call save_file(lab_outcontent_tmp&kft_getcode(),w_folderpath_tmp)
next
else
call save_file(lab_outcontent&kft_getcode(),w_folderpath)
end if
web_create=true
end if
closedb
'web_rs.close : set web_rs=nothing
End Function
rem 得到文件保存路径及保存文件名称
Function Get_File_Save_Path(v_rootdir,web_obj)
Path_Flag=Lcase(Request.Cookies("Web_File_Save_Path"))
w_path_flag=""
Select Case Path_Flag
case "sys:allchannel","sys:channellist":
w_path_flag=v_rootdir&Web_Get_Shop_Path&"html/sys/"&trim(web_obj("classename"))&"/index.html"
web_var_keyword="classkeywords" : web_var_description="classdescription" : web_var_title="classname"
case "ms:allproduct","ms:lastproduct","ms:dateproduct","ms:idproduct","ms:classproduct":
w_path_flag=v_rootdir&Web_Get_Shop_Path&"html/product/"
call FolderExist(w_path_flag)
w_path_flag=w_path_flag&trim(web_obj("p_onlyid"))&".html"
web_var_keyword="p_keyword" : web_var_description="p_description" : web_var_title="p_name"
case "ms:allchannel","ms:channellist":
w_path_flag=v_rootdir&Web_Get_Shop_Path&"html/ms/"&trim(web_obj("classename"))&"/index.html"
web_var_keyword="classkeywords" : web_var_description="classdescription" : web_var_title="classname"
case "ms:alltg","ms:tglist":
w_path_flag=v_rootdir&Web_Get_Shop_Path&"html/tg"
call FolderExist(w_path_flag)
w_path_flag=w_path_flag&"/"&trim(web_obj("onlyid"))&".html"
web_var_keyword="keyword" : web_var_description="description" : web_var_title="groupbuytitle"
case "ms:allclass","ms:classlist":
w_path_flag=v_rootdir&Web_Get_Shop_Path&"html/category"
call FolderExist(w_path_flag)
w_path_flag=w_path_flag&"/class_"&trim(web_obj("id"))&".html"
web_var_keyword="keyword" : web_var_description="description" : web_var_title="name"
case "ss:allchannel","ss:channellist":
w_path_flag=v_rootdir&Web_Get_Shop_Path&"html/ss/"&trim(web_obj("classename"))&"/index.html"
web_var_keyword="classkeywords" : web_var_description="classdescription" : web_var_title="classname"
case "ss:allclass","ss:classlist":
w_path_flag=v_rootdir&Web_Get_Shop_Path&"html/ss/class"
call FolderExist(w_path_flag)
w_path_flag=w_path_flag&"/shop_"&trim(web_obj("id"))&".html"
web_var_keyword="keyword" : web_var_description="description" : web_var_title="name"
case "ss:allarea","ss:arealist":
w_path_flag=v_rootdir&"html/ss/area/"
call FolderExist(w_path_flag)
w_path_flag=w_path_flag&"area_"&trim(web_obj("id"))&".html"
web_var_keyword="name" : web_var_description="name" : web_var_title="name"
case "ss:allinfo","ss:infolist":
w_path_flag=v_rootdir&Web_Get_Shop_Path&"html/ss/info"
call FolderExist(w_path_flag)
w_path_flag=w_path_flag&"/"&trim(web_obj("s_shopid"))&".html"
web_var_keyword="s_keywords" : web_var_description="s_discrption" : web_var_title="s_name"
case "as:allarticle","as:lastarticle","as:datearticle","as:idarticle","as:classarticle":
w_path_flag=v_rootdir&Web_Get_Shop_Path&"html/as/article/"
call FolderExist(w_path_flag)
w_path_flag=w_path_flag&trim(web_obj("a_onlyid"))&".html"
web_var_keyword="a_keywords" : web_var_description="a_description" : web_var_title="a_title"
case "as:allclass","as:classlist":
w_path_flag=v_rootdir&Web_Get_Shop_Path&"html/as/class/"
call FolderExist(w_path_flag)
w_path_flag=w_path_flag&"class_"&trim(web_obj("id"))&".html"
web_var_keyword="keyword" : web_var_description="description" : web_var_title="name"
case "gs:allinfo","gs:lastinfo","gs:dateinfo","gs:idinfo","gs:classinfo":
w_path_flag=v_rootdir&Web_Get_Shop_Path&"html/gs/info/"
call FolderExist(w_path_flag)
w_path_flag=w_path_flag&trim(web_obj("onlyid"))&".html"
web_var_keyword="keyword" : web_var_description="description" : web_var_title="bs_title"
case "gs:allchannel","gs:channellist":
w_path_flag=v_rootdir&Web_Get_Shop_Path&"html/gs/"&trim(web_obj("classename"))&"/index.html"
web_var_keyword="classkeywords" : web_var_description="classdescription" : web_var_title="classname"
case "gs:allclass","gs:classlist":
w_path_flag=v_rootdir&Web_Get_Shop_Path&"html/gs/class/"
call FolderExist(w_path_flag)
w_path_flag=w_path_flag&"class_"&trim(web_obj("id"))&".html"
web_var_keyword="keyword" : web_var_description="description" : web_var_title="name"
case "gs:allarea","gs:arealist":
w_path_flag=v_rootdir&"html/gs/area/"
call FolderExist(w_path_flag)
w_path_flag=v_rootdir&"html/gs/area/"
call FolderExist(w_path_flag)
w_path_flag=w_path_flag&"area_"&trim(web_obj("id"))&".html"
web_var_keyword="-1no" : web_var_description="no" : web_var_title="name"
case "ns:allnotice":
w_path_flag=v_rootdir&Web_Get_Shop_Path&"html/ns/"
call FolderExist(w_path_flag)
w_path_flag=w_path_flag&trim(web_obj("onlyid"))&".html"
web_var_keyword="keyword" : web_var_description="description" : web_var_title="n_title"
case "other:allhclass","other:hclasslist":
w_path_flag=v_rootdir&Web_Get_Shop_Path&"html/help"
call FolderExist(w_path_flag)
w_path_flag=w_path_flag&"/class"&trim(web_obj("id"))&".html"
web_var_keyword="keyword" : web_var_description="description" : web_var_title="name"
case "other:allhelp","other:helplist":
w_path_flag=v_rootdir&Web_Get_Shop_Path&"html/help"
call FolderExist(w_path_flag)
w_path_flag=w_path_flag&"/"&trim(web_obj("onlyid"))&".html"
web_var_keyword="h_keyword" : web_var_description="h_description" : web_var_title="h_title"
End Select
Get_File_Save_Path=w_path_flag
'showinfo Get_File_Save_Path
End Function
REM 得到模版路径
Function Get_File_Template_Path(v_rootdir,web_obj)
Path_Flag=Lcase(Request.Cookies("Web_File_Save_Path"))
w_path_flag=""
Select Case Path_Flag
case "sys:allchannel","sys:channellist","ms:allchannel","ms:channellist","gs:allchannel","gs:channellist","ss:allchannel","ss:channellist":
w_path_flag=web_obj("Templet")
case "ms:allproduct","ms:lastproduct","ms:dateproduct","ms:idproduct","ms:classproduct":
w_path_flag=web_obj("Templet")
case "ms:allclass","ms:classlist","ms:allextclass","ms:classextlist":
w_path_flag=web_obj("Templet")
case "ms:alltg","ms:tglist":
w_path_flag=web_obj("Templet")
case "ss:allclass","ss:classlist":
[color=Red] [color=wheat]w_path_flag=web_obj("Templet_shop") (这句报错)[/color][/color]
case "ss:allarea","ss:arealist":
if web_obj("fid")>0 then
w_path_flag=Web_C_sscity
else
w_path_flag=Web_C_ssprovince
end if
case "ss:allinfo","ss:infolist":
w_path_flag=Web_C_ss_detail
case "as:allarticle","as:lastarticle","as:datearticle","as:idarticle","as:classarticle":
w_path_flag=web_obj("Templet")
case "as:allclass","as:classlist":
w_path_flag=web_obj("Templet")
case "gs:allinfo","gs:lastinfo","gs:dateinfo","gs:idinfo","gs:classinfo":
w_path_flag=web_obj("Templet")
case "gs:allclass","gs:classlist":
w_path_flag=web_obj("Templet")
case "gs:allarea","gs:arealist":
if web_obj("fid")>0 then
w_path_flag=Web_C_gscity
else
w_path_flag=Web_C_gsprovince
end if
case "ns:allnotice":
w_path_flag=web_obj("Templet")
case "other:allhclass","other:hclasslist":
w_path_flag=web_obj("Templet")
case "other:allhelp","other:helplist":
w_path_flag=web_obj("Templet")
End Select
if isnull(w_path_flag)=true or w_path_flag="" then
Get_File_Template_Path=""
exit Function
end if
w_exist=Web_FileExist(w_path_flag)
if w_exist=false then
Get_File_Template_Path=""
exit Function
else
Get_File_Template_Path=w_path_flag
end if
End Function
Function Web_Get_Shop_Path()
Web_Get_Shop_Path=""
End Function
Function Web_Get_PageFN(tmpcontent,w_total,w_page_index,w_filename,w_extname)
Set w_REG_PageFN = New RegExp
w_REG_PageFN.Pattern= "{Web_Page}.*?{/Web_Page}"
w_REG_PageFN.IgnoreCase = True
w_REG_PageFN.Global = True
PageFlag=w_REG_PageFN.test(tmpcontent)
Set Matches = w_REG_PageFN.Execute(tmpcontent)
ji=0
for each match in matches
pagefn=match.value
pagefn1=match.value
Next
pagefn=replace(pagefn,"{Web_Page}","")
pagefn=replace(pagefn,"{/Web_Page}","")
w_link_type=split(pagefn,",")(0)
w_link_color=split(split(pagefn,",")(1),"|")(0)
w_link_css=split(split(pagefn,",")(1),"|")(1)
w_pagecontent=Get_More_Page_Link_Str(w_link_type,w_link_color,w_link_css,w_total,w_page_index,w_filename,w_extname)
Web_Get_PageFN=replace(tmpcontent,pagefn1,w_pagecontent)
End Function
Function Get_More_Page_Link_Str(w_More_Page_Link_Type,w_More_Page_Link_Color,w_More_Page_Css,w_Page_Count,w_More_Page_Index,w_File_Name,w_File_Ext_Name)
Dim w_i,Str_Link,LinkUrl,Str_Style,Str_LinkUrl_Page
Dim str_nonLinkColor,str_toF,str_toP10,str_toP1,str_toN1,str_toN10,str_toL,StartPage,EndPage,I
If w_More_Page_Index>w_Page_Count Then
w_More_Page_Index=w_Page_Count
End If
LinkUrl = w_File_Name
Str_Link=""
If w_More_Page_Link_Type="" Then
w_More_Page_Link_Type=0
End If
If w_More_Page_Link_Color<>"" Then
Str_Style=Str_Style&" style=""color: #"&w_More_Page_Link_Color&";"""
End If
If w_More_Page_Css<>"" Then
Str_Style=Str_Style&" class="""&w_More_Page_Css&""""
End If
If w_Page_Count>1 Then
Select Case w_More_Page_Link_Type
Case 1
If w_More_Page_Index=1 Then
Str_Link=Str_Link&"上一页"
Str_Link=Str_Link&" <a href="""&LinkUrl&"_"&w_More_Page_Index+1&"."&w_File_Ext_Name&""""&Str_Style&">下一页</a>"
ElseIf (w_More_Page_Index+1)>w_Page_Count Then
If w_More_Page_Index-1<2 Then
Str_Link=Str_Link&"<a href="""&LinkUrl&"."&w_File_Ext_Name&""""&Str_Style&">上一页</a>"
Else
Str_Link=Str_Link&"<a href="""&LinkUrl&"_"&w_More_Page_Index-1&"."&w_File_Ext_Name&""""&Str_Style&">上一页</a>"
End If
Str_Link=Str_Link&" 下一页"
Else
If w_More_Page_Index-1<2 Then
Str_Link=Str_Link&"<a href="""&LinkUrl&"."&w_File_Ext_Name&""""&Str_Style&">上一页</a>"
Else
Str_Link=Str_Link&"<a href="""&LinkUrl&"_"&w_More_Page_Index-1&"."&w_File_Ext_Name&""""&Str_Style&">上一页</a>"
End If
Str_Link=Str_Link&" <a href="""&LinkUrl&"_"&w_More_Page_Index+1&"."&w_File_Ext_Name&""""&Str_Style&">下一页</a>"
End If
Case 2
Str_Link="共"&w_Page_Count&"页 "
For w_i=1 To w_Page_Count
If w_i>1 Then
Str_LinkUrl_Page=LinkUrl&"_"&w_i
Else
Str_LinkUrl_Page=LinkUrl
End If
If w_i= w_More_Page_Index Then
Str_Link=Str_Link&" 第"&w_i&"页"
Else
Str_Link=Str_Link&" <a href="""&Str_LinkUrl_Page&"."&w_File_Ext_Name&""""&Str_Style&">第"&w_i&"页</a>"
End If
Next
Case 3
Str_Link="共"&w_Page_Count&"页 "
For w_i=1 To w_Page_Count
If w_i>1 Then
Str_LinkUrl_Page=LinkUrl&"_"&w_i
Else
Str_LinkUrl_Page=LinkUrl
End If
If w_i= w_More_Page_Index Then
Str_Link=Str_Link&" "&w_i&""
Else
Str_Link=Str_Link&" <a href="""&Str_LinkUrl_Page&"."&w_File_Ext_Name&""""&Str_Style&">"&w_i&"</a>"
End If
Next
Case Else
str_nonLinkColor="#999999" '非热链接颜色
str_toF="<font face=""webdings"">9</font>" '第一页
str_toP10="<font face=""webdings"">7</font>" '上十
str_toP1="<font face=""webdings"">3</font>" '上一
str_toN1="<font face=""webdings"">4</font>" '下一
str_toN10="<font face=""webdings"">8</font>" '下十
str_toL="<font face=""webdings"">:</font>" '尾页
Str_Link=""
if w_More_Page_Index=1 then
Str_Link=Str_Link& "<font color="&str_nonLinkColor&" title=""第一页"">"&str_toF&"</font> " &vbNewLine
Else
Str_Link=Str_Link& "<a href="""&LinkUrl&"."&w_File_Ext_Name&""""&Str_Style&" title=""第一页"">"&str_toF&"</a> " &vbNewLine
End If
if w_More_Page_Index<11 then
StartPage = 1
else
If w_More_Page_Index>(fix(w_More_Page_Index / 10) * 10) Then
StartPage = (fix(w_More_Page_Index / 10) * 10)+1
Else
StartPage = ((fix(w_More_Page_Index / 10)-1) * 10)+1
End If
end if
EndPage=StartPage+9
If EndPage>w_Page_Count Then
EndPage=w_Page_Count
End If
If StartPage>10 Then
If (w_More_Page_Index - 10)<2 Then
Str_Link=Str_Link& "<a href="""&LinkUrl&"."&w_File_Ext_Name&""""&Str_Style&" title=""上十页"">"&str_toP10&"</a> " &vbNewLine
Else
Str_Link=Str_Link& "<a href="""&LinkUrl&"_"&w_More_Page_Index - 10&"."&w_File_Ext_Name&""""&Str_Style&" title=""上十页"">"&str_toP10&"</a> " &vbNewLine
End If
Else
Str_Link=Str_Link& "<font color="&str_nonLinkColor&" title=""上十页"">"&str_toP10&"</font> " &vbNewLine
End If
If w_More_Page_Index > 1 Then
If w_More_Page_Index=2 Then
Str_Link=Str_Link& "<a href="""&LinkUrl&"."&w_File_Ext_Name&""""&Str_Style&" title=""上一页"">"&str_toP1&"</a> " &vbNewLine
Else
Str_Link=Str_Link& "<a href="""&LinkUrl&"_"&w_More_Page_Index - 1&"."&w_File_Ext_Name&""""&Str_Style&" title=""上一页"">"&str_toP1&"</a> " &vbNewLine
End If
Else
Str_Link=Str_Link& "<font color="&str_nonLinkColor&" title=""上一页"">"&str_toP1&"</font> " &vbNewLine
End If
For I=StartPage To EndPage
If I=w_More_Page_Index Then
Str_Link=Str_Link& "<b>"&I&"</b>" &vbNewLine
Else
If I=1 Then
Str_Link=Str_Link& "<a href="""&LinkUrl&"."&w_File_Ext_Name&""""&Str_Style&">" &I& "</a>" &vbNewLine
Else
Str_Link=Str_Link& "<a href="""&LinkUrl&"_"&I&"."&w_File_Ext_Name&""""&Str_Style&">" &I& "</a>" &vbNewLine
End If
End If
Next
If w_More_Page_Index < w_Page_Count Then
Str_Link=Str_Link& " <a href="""&LinkUrl&"_"&w_More_Page_Index + 1&"."&w_File_Ext_Name&""""&Str_Style&" title=""下一页"">"&str_toN1&"</a> " &vbNewLine
Else
Str_Link=Str_Link& "<font color="&str_nonLinkColor&" title=""下一页"">"&str_toN1&"</font> " &vbNewLine
End If
If EndPage<w_Page_Count Then
If (w_More_Page_Index+10)>w_Page_Count Then
Str_Link=Str_Link& " <a href="""&LinkUrl&"_"&w_Page_Count&"."&w_File_Ext_Name&""""&Str_Style&" title=""下十页"">"&str_toN10&"</a> " &vbNewLine
Else
Str_Link=Str_Link& " <a href="""&LinkUrl&"_"&w_More_Page_Index+10&"."&w_File_Ext_Name&""""&Str_Style&" title=""下十页"">"&str_toN10&"</a> " &vbNewLine
End If
Else
Str_Link=Str_Link& " <font color="&str_nonLinkColor&" title=""下十页"">"&str_toN10&"</font> " &vbNewLine
End If
if w_More_Page_Index<w_Page_Count Then
Str_Link=Str_Link& "<a href="""&LinkUrl&"_"&w_Page_Count&"."&w_File_Ext_Name&""""&Str_Style&" title=""尾页"">"&str_toL&"</a>" &vbNewLine
Else
Str_Link=Str_Link& "<font color="&str_nonLinkColor&" title=""尾页"">"&str_toL&"</font>" &vbNewLine
End If
End Select
End If
Get_More_Page_Link_Str="<div>"&Str_Link&"</div>"
End Function
Function Web_showclass_ajax(id)
str="<span id='Classinfo'></span>"&vbcrlf
str=str&"<script language='JavaScript' src='"&web_get_rootdir(web_c_setupfolder)&"ajax/Prototype.js' type='text/javascript'></script>"&vbcrlf
str=str&"<script language='JavaScript'>"&vbcrlf
str=str&"function Go()"&vbcrlf
str=str&"{MainSearch('Classinfo','classid="&id&"');}"&vbcrlf
str=str&"function MainSearch(GetType,URLValue)"&vbcrlf
str=str&"{new Ajax.Updater(GetType, '"&web_get_rootdir(web_c_setupfolder)&"showclass.asp?GetType='+GetType+'&no-cache='+Math.random() , {method: 'get',parameters: URLValue });}"&vbcrlf
str=str&"Go();"&vbcrlf
str=str&"</script>"&vbcrlf
Web_showclass_ajax=str
End Function
Function web_Get_keyword(v_content,v_content2,v_content3)
if isnull(v_content3)=true then
v_content3=""
end if
web_Get_keyword=replace(v_content,v_content2,v_content3)
End Function
%>
[[i] 本帖最后由 狐龙 于 2008-6-21 14:43 编辑 [/i]] 怎么一提到这样的问题就没人回答了呀
站长中国也一样 因为这个涉及程序问题,很麻烦。你说的问题是采集生成时出错,与你采集别的网站内容有关。只能找到这个页面删除它,不然你下面网页就不能生成。 这不是采集的数据
是重新生成首页
现在报错是SQL Server '80004005'
是不是数据库问题呢? 这系统没有采集外站数据的功能 估计是你的某个权限出了问题 [quote]原帖由 [i]deline[/i] 于 2008-6-21 13:19 发表 [url=http://www.im286.com/redirect.php?goto=findpost&pid=27131245&ptid=2677870][img]http://www.im286.com/images/common/back.gif[/img][/url]
估计是你的某个权限出了问题 [/quote]
感谢你的回复
可以说详细点吗?
谢谢您 我怀疑是数据库问题!
大家可以告诉我一个觉解的办法吗?
页:
[1]
