主题:  求站长大人帮忙……

lixiangwei

职务:普通成员
等级:1
金币:0.0
发贴:57
#12003/7/23 9:29:23
小弟想实现这样一个效果,就是出现此错误时(Microsoft OLE DB Provider for ODBC Drivers (0x80040E07)/html/news/search_gj3.asp, 第 76 行),跳转到另一页。
不知可行否,在线等……,拜托了。



今晚在线

职务:普通成员
等级:3
金币:1.0
发贴:761
#22003/7/23 23:14:08
第76行是什么啊?



lixiangwei

职务:普通成员
等级:1
金币:0.0
发贴:57
#32003/7/24 11:15:19
原程序如下:
<%
' *** Restrict Access To Page: Grant or deny access to this page
MM_authorizedUsers="高级"
MM_authFailedURL="../login/error.asp"
MM_grantAccess=false
If Session("MM_Username") <> "" Then
If (false Or CStr(Session("MM_UserAuthorization"))="") Or _
(InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then
MM_grantAccess = true
End If
End If
If Not MM_grantAccess Then
MM_qsChar = "?"
If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
MM_referrer = Request.ServerVariables("URL")
if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString()
MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer)
Response.Redirect(MM_authFailedURL)
End If
%>
<%
Dim news__MMColParam4
news__MMColParam4 = "%"
If (request.querystring("wh") <> "") Then
news__MMColParam4 = request.querystring("wh")
End If
%>
<%
Dim news__wen
news__wen = "%"
If (request.querystring("title") <> "") Then
news__wen = request.querystring("title")
End If
%>
<%
Dim news__shui
news__shui = "%"
If (request.querystring("textfield") <> "") Then
news__shui = request.querystring("textfield")
End If
%>
<%
Dim news__jiguan
news__jiguan = "%"
If (request.querystring("textfield2") <> "") Then
news__jiguan = request.querystring("textfield2")
End If
%>
<%
Dim news__wenhao
news__wenhao = "%"
If (request.querystring("wenhao") <> "") Then
news__wenhao = request.querystring("wenhao")
End If
%>
<%
Dim news__zheng
news__zheng = "%"
If (request.querystring("zw") <> "") Then
news__zheng = request.querystring("zw")
End If
%>
<%
Dim news__sh
news__sh = "已审核"
If (Request("MM_Emptyvalue") <> "") Then
news__sh = Request("MM_Emptyvalue")
End If
%>
<%
Dim news
Dim news_numRows
Set news = Server.CreateObject("ADODB.Recordset")
news.ActiveConnection = MM_news_STRING
news.Source = "SELECT * FROM news WHERE (wh like '%" + Replace(news__MMColParam4, "'", "''") + "%'and title like'%" + Replace(news__wen, "'", "''") + "%'and suiz like'%" + Replace(news__shui, "'", "''") + "%'and fwjg like'%" + Replace(news__jiguan, "'", "''") + "%'and (wh = '" + Replace(news__wenhao, "'", "''") + "'or wh like '%" + Replace(news__wenhao, "'", "''") + "%')and text_zw like '%" + Replace(news__zheng, "'", "''") + "%')and shenh='" + Replace(news__sh, "'", "''") + "' ORDER BY id desc"
news.CursorType = 0
news.CursorLocation = 2
news.LockType = 1
news.Open()

news_numRows = 0
%>



我有BLOG了

职务:普通成员
等级:4
金币:16.8
发贴:2209
#42003/7/26 2:08:15
楼上你的这么给出代码是不行的,难道让回答你问题的前辈一行行数,你用DW查查76行是什么,然后发出来,让76行红字现实!



缺缺

职务:管理员
等级:8
金币:41.0
发贴:9620
#52003/7/26 11:34:51
我估计楼主的意思是当IIS报500错误时自动转到一个自定义的 错误页面,而不是原来的那个错误页面