473,396 Members | 1,915 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

EOF error trapping

I am trying figure this out, I am using the example from aspfaq dot com
<%
If not objRS.EOF then

DO WHILE NOT objRS.EOF
%>
<p align="left"><font face="Arial" size="1">Posted by <%=
objRS("name") %> on <%= objRS("date") %> at <%= objRS("time") %></font></td>

<%
objRS.MoveNext
Loop
else
response.write "No comments posted yet."
end if

%>

If my db doesn't have a record I still get this:
Error Type:
ADODB.Field (0x80020009)
Either BOF or EOF is True, or the current record has been deleted. Requested
operation requires a current record.

If it does have a record it works as it should. Am I missing something
really obvious?
Jul 19 '05 #1
2 3243
Well, I don't see anything really obvious. Are you sure this is where the
error's occurring? Do you have any other code that tries to pull in values
from objRS outside of the If/Then block? What code comes just before this
snippet and just after it?

Ray at home

"Tom Petersen" <pe****@sdsd.sdbor.edu> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I am trying figure this out, I am using the example from aspfaq dot com
<%
If not objRS.EOF then

DO WHILE NOT objRS.EOF
%>
<p align="left"><font face="Arial" size="1">Posted by <%=
objRS("name") %> on <%= objRS("date") %> at <%= objRS("time") %></font></td>
<%
objRS.MoveNext
Loop
else
response.write "No comments posted yet."
end if

%>

If my db doesn't have a record I still get this:
Error Type:
ADODB.Field (0x80020009)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.

If it does have a record it works as it should. Am I missing something
really obvious?

Jul 19 '05 #2
Nice catch Ray!
I changed this:
<FORM name ="add" METHOD="POST" action="comrslt.asp?action=add&topic=<%
=objRS("topic") %>">
to this:
<FORM name ="add" METHOD="POST" action="comrslt.asp?action=add&topic=<%
=strID %>">
and that took care of the problem, it wasn't the error trapping code at all.
"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
message news:uh**************@tk2msftngp13.phx.gbl...
Well, I don't see anything really obvious. Are you sure this is where the
error's occurring? Do you have any other code that tries to pull in values from objRS outside of the If/Then block? What code comes just before this
snippet and just after it?

Ray at home

"Tom Petersen" <pe****@sdsd.sdbor.edu> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I am trying figure this out, I am using the example from aspfaq dot com
<%
If not objRS.EOF then

DO WHILE NOT objRS.EOF
%>
<p align="left"><font face="Arial" size="1">Posted by <%=
objRS("name") %> on <%= objRS("date") %> at <%= objRS("time")

%></font></td>

<%
objRS.MoveNext
Loop
else
response.write "No comments posted yet."
end if

%>

If my db doesn't have a record I still get this:
Error Type:
ADODB.Field (0x80020009)
Either BOF or EOF is True, or the current record has been deleted.

Requested
operation requires a current record.

If it does have a record it works as it should. Am I missing something
really obvious?


Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Robert Wing | last post by:
I support an MS Access application in which errors are trapped using the On Error statement. Just recently, the users of this system have experienced run-time error number 3021 on a random basis. ...
2
by: Steve Richfield | last post by:
My error handler works GREAT. However, VBA seems to have some bugs/features that are causing it fits. The little snippet that I put at the end of each routine looks like this: Error_Handler: If...
3
by: Nathan Bloomfield | last post by:
Hi there, I am having difficulty with a piece of code which would work wonders for my application if only the error trapping worked properly. Basically, it works as follows: - adds records...
13
by: Thelma Lubkin | last post by:
I use code extensively; I probably overuse it. But I've been using error trapping very sparingly, and now I've been trapped by that. A form that works for me on the system I'm using, apparently...
3
by: Smriti Dev | last post by:
Hi There, I have the following code and when I try to run it, I get a type mismatch error. I would really appreciate your help with this. Thanks kindly, smriti --- Private Sub cmdOK_Click()
2
by: Bill Stock | last post by:
I have a subform which is causing a 3314 (Field can't contain a null value because required is set to True) error. I solved this problem by trapping it in the before update event. But then I...
2
by: Captain Nemo | last post by:
I'm still using Office 2000 myself, but some of my clients have Office 2003. I've recently added a piece of code to create an instance of Word, open a document, fill in the blanks and become...
9
by: 47computers | last post by:
Pretty new to PHP, I recently started learning about error trapping. As of right now, I include the following into a page in my website: -------BEGIN PASTE-------- error_reporting(E_ERROR |...
2
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.