Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9106335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T02:18:53+00:00 2026-06-17T02:18:53+00:00

My code was working fine when I was using just one of the below

  • 0

My code was working fine when I was using just one of the below pieces of code but when I added another one, the results for it did not show up. It seems EOF can’t work when its run twice on the same page. If anyone can help, that would be appreciated.

<% while (NOT con.EOF) %>
    CODE HERE
<%con.MoveNext()
 Wend %>

CODE:

<% if not con.BOF then %>
<div style="margin-top:1em">

<form action="dbresults.htm" method="get">

      <p>Company name:<br/>
      <select name="abn">
        <option label="All companies" value="all"></option>
        <% while (NOT con.EOF) %>
       <option label="<%=con("legal")%>" value="<%=con("abn")%>"></option>
    <%con.MoveNext()
                      Wend %>
  </select>
  </p>
 <p>Categories for Creative Design:<br/>
  <select name="cat">
    <option label="All categories" value="all"></option>
    <option label="Strategic brand, marketing and communications advice" value="a"></option>
    <option label="Graphic design and layout" value="b"></option>
    <option label="Forms design" value="c"></option>
    <option label="Web design and development" value="d"></option>
    <option label="Authoring services" value="e"></option>
    <option label="Editorial services" value="f"></option>
    <option label="Translation services" value="g"></option>
    <option label="Photography and film services" value="h"></option>
    <option label="Scanning and digitisation services" value="i"></option>
    <option label="Multimedia editing services" value="j"></option>
  </select>
</p>
<input type="submit" value="Search" />
</form>
<br /><hr />

<table style="font-size:.9em;" class="contentTable">
      <tr>
            <th>ABN:</th>
            <th>Company Name:</td>
      </tr>
  <% while (NOT con.EOF) %>
      <tr>
            <td><%=con("abn")%></th>
            <td><a href="dbcomp.htm?abn=<%=con("abn")%>&cat=all">         
 <%=con("legal")%></a></td>
      </tr>
 <%
   con.MoveNext()
Wend
  %>
 </table>
</div>
 <% else %>
 <p>No records match your query.</p>
  <p><a href="dbtest.htm">Return to search page</a></p>
 <%
 end if
 con.close
 %>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T02:18:54+00:00Added an answer on June 17, 2026 at 2:18 am

    After your first WHILE loop (while (NOT con.EOF)) your recordset is left at EOF, therefore your second loop won’t do anything. You need to reposition the cursor in your recordset prior to your second loop. Use con.MoveFirst(), con.MovePrevious(), etc to reposition.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a code displayed below and its just working fine. But I was
I am using Slidesjs it working fine in below url http://www.mysoko.in/demo/Simple/ And same code
I'using the following code to create thumbnails using ffmpeg but it was working fine
I am using blow code for join in nhibernate, which is working fine. But
the below code is working fine if the user enters the USN number that
For single output types my code is working fine but I couldn't get how
So my code has been working fine, and I was added some extra functionality
I am using FluentMongo and the MongoDBCSharpDriver. My code was working fine for a
I was using Highcharts 1.7 and everything was working just fine with this label
I just completed the chat application using Java which is working fine . Now

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.