Access Problem

Discussion in 'ASP General' started by Jay, Aug 27, 2004.

  1. Jay

    Jay Guest

    I am trying to show pictures in a table where the name of the pic is located
    in my access database. I would like two columns with a different pic in
    each column. Below is the code. I guess my question is I am trying to
    advance the to the next record before my wend statement. I used
    rstemp.movenext and it comes up with an error saying either BOF or EOF is
    true. It works if I remove the first rstemp.movenext statement, but it is
    only 1 column. Any help?

    <%while not rstemp.eof%>
    <tr>
    <td width="55%"><div align="center">
    <p><img src="pics/<%= rstemp("picname")%>" width="294"
    height="203"></p>
    <p><%= rstemp("title")%></p>
    </div></td>
    <td width="45%">&nbsp;</td>
    </tr>
    <%rstemp.movenext%>
    <tr>
    <td><div align="center">
    <p><img src="pics/<%= rstemp("picname")%>" width="294"
    height="203"></p>
    <p><%= rstemp("title")%></p>
    </div></td>
    <td>&nbsp;</td>
    </tr>
    <%rstemp.movenext
    wend%>
    Jay, Aug 27, 2004
    #1
    1. Advertising

  2. Jay

    Jeff Cochran Guest

    On Fri, 27 Aug 2004 04:33:46 GMT, "Jay" <> wrote:

    >I am trying to show pictures in a table where the name of the pic is located
    >in my access database. I would like two columns with a different pic in
    >each column. Below is the code. I guess my question is I am trying to
    >advance the to the next record before my wend statement. I used
    >rstemp.movenext and it comes up with an error saying either BOF or EOF is
    >true. It works if I remove the first rstemp.movenext statement, but it is
    >only 1 column. Any help?


    Loop your recordset only once and use a counter to add the client code
    to go to the next row. Also see:

    How do I change a list into a set of table rows and columns?
    http://www.aspfaq.com/show.asp?id=2247

    Jeff

    > <%while not rstemp.eof%>
    > <tr>
    > <td width="55%"><div align="center">
    > <p><img src="pics/<%= rstemp("picname")%>" width="294"
    >height="203"></p>
    > <p><%= rstemp("title")%></p>
    > </div></td>
    > <td width="45%">&nbsp;</td>
    > </tr>
    > <%rstemp.movenext%>
    > <tr>
    > <td><div align="center">
    > <p><img src="pics/<%= rstemp("picname")%>" width="294"
    >height="203"></p>
    > <p><%= rstemp("title")%></p>
    > </div></td>
    > <td>&nbsp;</td>
    > </tr>
    > <%rstemp.movenext
    > wend%>
    >
    >
    Jeff Cochran, Aug 27, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. luican
    Replies:
    3
    Views:
    12,264
    Aaron W. West
    Jun 4, 2004
  2. david
    Replies:
    2
    Views:
    1,627
    Ken Cox [Microsoft MVP]
    Nov 24, 2003
  3. Guest
    Replies:
    2
    Views:
    540
    Guest
    Feb 2, 2004
  4. Guest
    Replies:
    0
    Views:
    503
    Guest
    Feb 9, 2004
  5. MSDN
    Replies:
    0
    Views:
    677
Loading...

Share This Page