• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

SHow Recordset problem

Participant ,
Apr 01, 2009 Apr 01, 2009

Copy link to clipboard

Copied

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)%> <%=(rsAllCourses.Fields.Item("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: </span><%=(rsAllCourses.Fields.Item("Prerequisites").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)%> <%=(rsSubType.Fields.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>        <a href="<%=MM_movePrev%>">&lt;&lt;  Previous</a>        <a href="<%=MM_moveNext%>">Next  &gt;&gt;</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: </span><%=(rsAllType.Fields.Item("Prerequisites").Value)%><br />
<span class="bold">Category: </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 %>
TOPICS
Server side applications

Views

737

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 02, 2009 Apr 02, 2009

Copy link to clipboard

Copied

redant34jessica wrote:
> 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

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 02, 2009 Apr 02, 2009

Copy link to clipboard

Copied


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!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 02, 2009 Apr 02, 2009

Copy link to clipboard

Copied

I ended up just going to a new page to show the recordset data there

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 02, 2009 Apr 02, 2009

Copy link to clipboard

Copied

redant34jessica wrote:
> 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 %>

> 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 %>

> 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 %>

> 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.

> 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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 02, 2009 Apr 02, 2009

Copy link to clipboard

Copied

LATEST
ah thanks so much! I'll look into that.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines