求教: HTTP 错误 500.100 消失后,在搜索栏只能搜索第1条记录
我因以姓名做搜索栏之前做了一个静态网页,出现 HTTP 错误 500.100 - 内部服务器错误 - ASP 错误,不能显示内容,应怎样改正?请求热心者教一下!1.表样
序号 {Recordset1.序号}
姓名 {Recordset1.姓名}
部门 {Recordset1.部门}
编号 {Recordset1.编号}
2.无法显示网页
试图访问的网页出现问题,无法显示。
请尝试执行下列操作:
• 单击刷新按钮,或稍后重试。
• 打开 localhost 主页,然后查找与所需信息相关的链接。
HTTP 错误 500.100 - 内部服务器错误 - ASP 错误
Internet 信息服务
技术信息(用于支持人员)
• 错误类型:
ADODB.Field (0x800A0BCD)
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。
/SS.asp, 第 108 行
• 浏览器类型:
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)
• 网页:
GET /SS.asp
• 时间:
2012年12月22日, 下午 01:48:56
详细信息:
Microsoft 支持
3.代码
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Connections/huyb.asp" -->
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Request.Form("姓名") <> "") Then
Recordset1__MMColParam = Request.Form("姓名")
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_huyb_STRING
Recordset1.Source = "SELECT * FROM 表1 WHERE 姓名 = '" + Replace(Recordset1__MMColParam, "'", "''") + "' ORDER BY 姓名 ASC"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
Dim Recordset1_total
Dim Recordset1_first
Dim Recordset1_last
' set the record count
Recordset1_total = Recordset1.RecordCount
' set the number of rows displayed on this page
If (Recordset1_numRows < 0) Then
Recordset1_numRows = Recordset1_total
Elseif (Recordset1_numRows = 0) Then
Recordset1_numRows = 1
End If
' set the first and last displayed record
Recordset1_first = 1
Recordset1_last = Recordset1_first + Recordset1_numRows - 1
' if we have the correct record count, check the other stats
If (Recordset1_total <> -1) Then
If (Recordset1_first > Recordset1_total) Then
Recordset1_first = Recordset1_total
End If
If (Recordset1_last > Recordset1_total) Then
Recordset1_last = Recordset1_total
End If
If (Recordset1_numRows > Recordset1_total) Then
Recordset1_numRows = Recordset1_total
End If
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them
If (Recordset1_total = -1) Then
' count the total records by iterating through the recordset
Recordset1_total=0
While (Not Recordset1.EOF)
Recordset1_total = Recordset1_total + 1
Recordset1.MoveNext
Wend
' reset the cursor to the beginning
If (Recordset1.CursorType > 0) Then
Recordset1.MoveFirst
Else
Recordset1.Requery
End If
' set the number of rows displayed on this page
If (Recordset1_numRows < 0 Or Recordset1_numRows > Recordset1_total) Then
Recordset1_numRows = Recordset1_total
End If
' set the first and last displayed record
Recordset1_first = 1
Recordset1_last = Recordset1_first + Recordset1_numRows - 1
If (Recordset1_first > Recordset1_total) Then
Recordset1_first = Recordset1_total
End If
If (Recordset1_last > Recordset1_total) Then
Recordset1_last = Recordset1_total
End If
End If
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<table width="542" border="1">
<tr>
<td width="90" height="46">序号</td>
<td width="436"><%=(Recordset1.Fields.Item("序号").Value)%></td>
</tr>
<tr>
<td height="40">姓名</td>
<td><%=(Recordset1.Fields.Item("姓名").Value)%></td>
</tr>
<tr>
<td height="41">部门</td>
<td><%=(Recordset1.Fields.Item("部门").Value)%></td>
</tr>
<tr>
<td height="49">编号</td>
<td><%=(Recordset1.Fields.Item("编号").Value)%></td>
</tr>
</table>
<%=(Recordset1_first)%>
<%=(Recordset1_last)%>
<%=(Recordset1_total)%>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
[ 本帖最后由 sdfox 于 2012-12-24 19:01 编辑 ]