急急急求答案 ADODB.Field (0x800A0BCD)BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。
错误类型:
ADODB.Field (0x800A0BCD
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。/dengluch.asp, 第 181 行
第181行代码:<td width="206"><span class="STYLE5"> <a href="chakan.asp?<%= Server.HTMLEncode(MM_keepBoth) & MM_joinChar(MM_keepBoth) & "name=" & Recordset1.Fields.Item("name").Value %>">查看我的通讯录</a> </span> </td>
原代码:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/xiaoyoulu.asp" -->
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Request.QueryString("name") <> "") Then
Recordset1__MMColParam = Request.QueryString("name")
End If
%>
<%
Dim Recordset1
Dim Recordset1_cmd
Dim Recordset1_numRows
Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
Recordset1_cmd.ActiveConnection = MM_xiaoyoulu_STRING
Recordset1_cmd.CommandText = "SELECT address, E_mail, name, tel FROM xiaoyoulu WHERE name = ?"
Recordset1_cmd.Prepared = true
Recordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param1", 200, 1, 50, Recordset1__MMColParam) ' adVarChar
Set Recordset1 = Recordset1_cmd.Execute
Recordset1_numRows = 0
%>
<%
Dim MM_paramName
%>
<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
Dim MM_keepNone
Dim MM_keepURL
Dim MM_keepForm
Dim MM_keepBoth
Dim MM_removeList
Dim MM_item
Dim MM_nextItem
' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then
MM_removeList = MM_removeList & "&" & MM_paramName & "="
End If
MM_keepURL=""
MM_keepForm=""
MM_keepBoth=""
MM_keepNone=""
' add the URL parameters to the MM_keepURL string
For Each MM_item In Request.QueryString
MM_nextItem = "&" & MM_item & "="
If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item))
End If
Next
' add the Form variables to the MM_keepForm string
For Each MM_item In Request.Form
MM_nextItem = "&" & MM_item & "="
If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item))
End If
Next
' create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL & MM_keepForm
If (MM_keepBoth <> "") Then
MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
End If
If (MM_keepURL <> "") Then
MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1)
End If
If (MM_keepForm <> "") Then
MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
End If
' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
If (firstItem <> "") Then
MM_joinChar = "&"
Else
MM_joinChar = ""
End If
End Function
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>无标题文档</title>
<!-- TemplateEndEditable -->
<style type="text/css">
<!--
#apDiv1 {
position:absolute;
left:2px;
top:156px;
width:694px;
height:394px;
z-index:1;
}
#apDiv2 {
position:absolute;
left:23px;
top:4px;
width:847px;
height:155px;
z-index:2;
background-color: #33FF33;
}
#apDiv3 {
position:absolute;
left:12px;
top:23px;
width:209px;
height:153px;
z-index:3;
}
h1,h2,h3,h4,h5,h6 {
font-weight: bold;
}
.STYLE1 {
font-size: 60px;
font-weight: bold;
color: #FF9933;
}
#apDiv4 {
position:absolute;
left:23px;
top:161px;
width:846px;
height:273px;
z-index:3;
background-color: #FFFFCC;
}
#apDiv5 {
position:absolute;
left:27px;
top:143px;
width:228px;
height:146px;
z-index:4;
visibility: visible;
}
#apDiv6 {
position:absolute;
left:190px;
top:97px;
width:501px;
height:42px;
z-index:5;
}
.STYLE2 {
color: #FFFF00;
font-size: 24px;
}
.STYLE4 {
color: #FF3300;
font-weight: bold;
font-size: 18px;
}
.STYLE5 {
color: #33FFFF;
font-size: 24px;
font-weight: bold;
}
-->
</style>
<!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
</head>
<body>
<div id="apDiv4">
<div align="center">
<form id="form1" name="form1">
<p class="STYLE5">恭喜您,登录成功!!!</p>
<table width="433" height="67" border="1">
<tr>
<td width="206"><span class="STYLE5"> <a href="chakan.asp?<%= Server.HTMLEncode(MM_keepBoth) & MM_joinChar(MM_keepBoth) & "name=" & Recordset1.Fields.Item("name").Value %>">查看我的通讯录</a> </span> </td>
<td width="211"><span class="STYLE5"><a href="chaxun.asp">查看校友的通讯录</a> </span></td>
</tr>
</table>
<p class="STYLE5"> </p>
</form>
</div>
</div>
<div id="apDiv6">
<div align="center" class="STYLE2">即使我们各奔东西,但我们仍然心连心!</div>
</div>
<div id="apDiv2">
<div align="center" class="STYLE1">广州大学校友录</div>
</div>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>