Discussion:
SHow Recordset problem
(too old to reply)
redant34jessica
2009-04-01 18:34:13 UTC
Permalink
I'm not well versed in ASP. I have one page where I have 3 regions Two are
recordsets. THe other is text that says "sorry no items at this time" THe two
recordsets are filtered by the URL parameter. the recordsets show up correctly
when the parameter is passed. THe "sorry no items at this time" brings up the
error:

ADODB.Field error '800a0bcd'
Either BOF or EOF is True, or the current record has been deleted. Requested
operation requires a current record.

IS there a way to get these 3 items to work together using IF


<% If rsAllType.EOF And rsAllType.BOF Then %>
<div><p>
<span class="subtitle">

<%=(rsAllCourses.Fields.Item("Type").Value)%>&nbsp;<%=(rsAllCourses.Fields.Ite
m("SubType").Value)%> Courses
</span><br /><br />
<% While ((Repeat4__numRows <> 0) AND (NOT rsAllCourses.EOF)) %>
<span class="boldgray">
<a href="CourseDetail.asp?<%= Server.HTMLEncode(MM_keepURL) &
MM_joinChar(MM_keepURL) & "CourseID=" &
rsAllCourses.Fields.Item("CourseID").Value %>">
<%=(rsAllCourses.Fields.Item("Title").Value)%></a></span>
<br />
<%=(rsAllCourses.Fields.Item("Description").Value)%><br />
<span
class="bold">Prerequisites:&nbsp;</span><%=(rsAllCourses.Fields.Item("Prerequisi
tes").Value)%>
<br /><br />
<% Repeat4__index=Repeat4__index+1
Repeat4__numRows=Repeat4__numRows-1
rsAllCourses.MoveNext()
Wend %>
</p></div>
<% End If ' end rsAllType.EOF And rsAllType.BOF %>
<% If rsAllCourses.EOF And rsAllCourses.BOF Then %>
<div>
<span
class="subtitle"><%=(rsType.Fields.Item("Type").Value)%>&nbsp;<%=(rsSubType.Fiel
ds.Item("SubType").Value)%> Courses</span><br />
<br />
No classes at this time, please check back soon. <br />
</p>
</div>
<% End If ' end rsAllCourses.EOF And rsAllCourses.BOF %>
<% If Not rsAllType.EOF Or Not rsAllType.BOF Then %>
<p>
<span class="subtitle">All Courses</span><span class="boldgray"> <br />
<br />
Listed
Alphabetically</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a
href="<%=MM_movePrev%>"><<&nbsp;&nbsp;Previous</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;<a href="<%=MM_moveNext%>">Next&nbsp;&nbsp;>></a><br />
<br />
</p>
<%
While ((Repeat5__numRows <> 0) AND (NOT rsAllType.EOF)) %>
<div>
<p>
<span class="boldgreen">
<%=(rsAllType.Fields.Item("Title").Value)%></span><br />
<%=(rsAllType.Fields.Item("Description").Value)%><br />
<span
class="bold">Prerequisites:&nbsp;</span><%=(rsAllType.Fields.Item("Prerequisites
").Value)%><br />
<span
class="bold">Category:&nbsp;</span><%=(rsAllType.Fields.Item("Type").Value)%><br
/>
<span
class="bold">Curriculum:</span><%=(rsAllType.Fields.Item("SubType").Value)%><br
/>
<br /></p>
</div>
<% Repeat5__index=Repeat5__index+1
Repeat5__numRows=Repeat5__numRows-1
rsAllType.MoveNext()
Wend %>
<% End If ' end Not rsAllType.EOF Or NOT rsAllType.BOF %>
Dooza
2009-04-02 08:15:18 UTC
Permalink
Post by redant34jessica
I'm not well versed in ASP. I have one page where I have 3 regions Two are
recordsets. THe other is text that says "sorry no items at this time" THe two
recordsets are filtered by the URL parameter. the recordsets show up correctly
when the parameter is passed. THe "sorry no items at this time" brings up the
ADODB.Field error '800a0bcd'
Either BOF or EOF is True, or the current record has been deleted. Requested
operation requires a current record.
IS there a way to get these 3 items to work together using IF
Let me see if I understand what your page is doing:

If rsAllType is empty display rsAllCourses

If rsAllCourses is empty display warning message

If rsAllCourses is not empty, display rsAllType


In a similar way to the above, what is it you want the page to do?

Dooza
redant34jessica
2009-04-02 14:36:35 UTC
Permalink
Let me see if I understand what your page is doing:

If rsAllType is empty display rsAllCourses

If rsAllCourses is empty display warning message

If rsAllCourses is not empty, display rsAllType


In a similar way to the above, what is it you want the page to do?

Dooza

If AllCourses NOT empty display AllCourses (there are links on page to display
this filtered recordset using URL Parameter - "TypeID")

If AllCourses empty and AllTypes NOT empty show AllTypes (there is a link on
page to display ALL using a URL Parameter- "Type")

If AllCourses empty and AllTypes empty show warning message (If there is no
data a link on page where there is currently no data)

Another Question is when a recordset is filtered by a URL parameter, if that
URL parameter does not exist in the URL is the recordset EMPTY??

Please help. THank you very much!
redant34jessica
2009-04-02 14:52:28 UTC
Permalink
I ended up just going to a new page to show the recordset data there
Dooza
2009-04-02 14:51:11 UTC
Permalink
Post by redant34jessica
If AllCourses NOT empty display AllCourses (there are links on page to display
this filtered recordset using URL Parameter - "TypeID")
<% If Not rsAllCourses.EOF Or Not rsAllCourses.BOF Then %>
Post by redant34jessica
If AllCourses empty and AllTypes NOT empty show AllTypes (there is a link on
page to display ALL using a URL Parameter- "Type")
If (rsAllCourses.EOF AND rsAllCourses.BOF) AND (NOT rsAllTypes.EOF OR
NOT rsAllTypes.BOF) Then %>
Post by redant34jessica
If AllCourses empty and AllTypes empty show warning message (If there is no
data a link on page where there is currently no data)
<% If rsAllCourses.EOF And rsAllCourses.BOF AND rsAllTypes.EOF And
rsAllTypes.BOF Then %>
Post by redant34jessica
Another Question is when a recordset is filtered by a URL parameter, if that
URL parameter does not exist in the URL is the recordset EMPTY??
That depends on what you set the default value to be. I try to use a
value that will never be used, like -1, so when the URL parameter
doesn't exist, the recordset uses -1 instead. It won't find a record
with -1 as the value, so returns an empty recordset.
Post by redant34jessica
Please help. THank you very much!
See how you get on with the above.

Dooza
--
Posting Guidelines
http://www.adobe.com/support/forums/guidelines.html
How To Ask Smart Questions
http://www.catb.org/esr/faqs/smart-questions.html
How To Report A Bug To Adobe
http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
redant34jessica
2009-04-02 15:10:18 UTC
Permalink
ah thanks so much! I'll look into that.

Loading...