Because I have been engaged in Java and do not understand the VB syntax, I was unable to solve this problem for a day (half a year ago). Later, I did not pay attention to it due to the rush of time, I think of it by accident today and finally solved it.
This problem is encountered when maintaining a very small ASP Website. In fact, it is a classic asp bug: when adding news, an exception is reported when no title image is added to the news page or all news is cleared.
"ADODB. Field error '800a0bcd'
Either BOF or EOF is "true", or the current record has been deleted. The operation required requires a current record ."
There are also many ways to solve this problem on the Internet, except that there is no Rs. bof and Rs. EOF judgment: According to the online method, the corresponding judgment is added to handle the corresponding exception, but after the judgment is added, an exception is reported when the title image of the homepage is not added to the news.
The VB problem code originally embedded in the webpage:
<%
Smallpic = ""
SQL = "select * From Jiuye order by news_id DESC"
Set rs = server. Createobject ("ADODB. recordset ")
Rs. Open SQL, Conn, 1, 1
Rs. movelast
Rscount = Rs. recordcount
Rs. movefirst
%>
<! --- The smallpic field refers to the title image -->
<%
While smallpic = ""
Smallpic = RS ("smallpic ")
Smallpictitle = RS ("news_title ")
Smallpic_id = RS ("news_id ")
Rs. movenext
Wend
%>
The error is still reported in the RS. Open SQL, Conn, line. In fact, the root cause is that while smallpic = "" in this judgment, this judgment is repeated, so that when there is no image, the error will continue to be reported. Delete while smallpic = "" and Wend, and add corresponding exception handling in the original code if Rs. bof and Rs. EOF then ...... Else ...... End if and so on.
In fact, taking a closer look at these codes, this kind of code is very low-level, the level of code writing is also very elementary, it is a mess.