ADODB.Field (0x800A0BCD)这个错误怎么改?
错误类型:ADODB.Field (0x800A0BCD)
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。
/myweb/xiugai.asp, 第 169 行
程序如下:
<body>
<div align="center" class="STYLE1">修改数据库记录</div>
<form action="<%=MM_editAction%>" method="POST" name="form1" class="STYLE2" id="form1">
修改联系电话:
<label>
<input name="tel" type="text" id="tel" />
</label>
<label>
<input type="submit" name="Submit" value="提交" />
</label>
<input type="hidden" name="MM_update" value="form1">
<input type="hidden" name="MM_recordId" value="<%= Recordset1.Fields.Item("id").Value %>">
</form>
</body>
请教高手:很奇怪的问题?遇到过的人很多
错误类型:ADODB.Field (0x800A0BCD)
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。
/habooknet/web/Vote-modify.asp, 第 288 行
部分代码如下:(代码已打包到附件)
<%
Dim rsVoteItems
Dim rsVoteItems_numRows
Set rsVoteItems = Server.CreateObject("ADODB.Recordset")
rsVoteItems.ActiveConnection = MM_habook_STRING
rsVoteItems.Source = "SELECT * FROM tVoteltems WHERE TitleID = " + Replace(rsVoteItems__MMColParam, "'", "''") + ""
rsVoteItems.CursorType = 0
rsVoteItems.CursorLocation = 2
rsVoteItems.LockType = 1
rsVoteItems.Open()
rsVoteItems_numRows = 0
%>
......
<input type="hidden" name="MM_update" value="form1">
<input type="hidden" name="MM_recordId" value="<%= rsVoteTitle.Fields.Item("TitleID").Value %>"> '第 288 行
我发现遇到过此情况的人很多,错误在于没有选择出数据,rsVoteTitle是个空记录集,所以运行到
="<%= rsVoteTitle.Fields.Item("TitleID").Value %>"> 这一句就会出错。
[bo][color=Red]当我加入如下语句后 BOF 或 EOF错误没有了,但是却更新不了数据库内的记录,高手帮我啊[/color][/bo][em13] [em13]
<%if not rsVoteTitle.Eof and not rsVoteTitle.Bof Then%>
<input type="hidden" name="MM_update" value="form1">
<input type="hidden" name="MM_recordId" value="<%= rsVoteTitle.Fields.Item("TitleID").Value %>">
<%Else%>
找不到相关记录
<%End if%>
页:
[1]
