Results 1 to 2 of 2

Thread: Selecting * where row = from DB

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    ma,usa
    Posts
    485
    Is there an easy way to set each item in a field to a cell of a table without having to refer to each field when I execute "Select * from table where row = rownum"? In other words, Is there a fields collection of a row that I can scroll through and assign to cells in a table in same order?
    If so do you have an example?

  2. #2
    Fanatic Member Ianpbaker's Avatar
    Join Date
    Mar 2000
    Location
    Hastings
    Posts
    696
    hi joeyo.

    You can use the following, (I've ommited some code, which you should know

    Code:
    Dim iFlag
    Dim objRec
    
    
    'open connection's and recordset
    
    While not objrec.eof
    %>
    <tr>
    <%
    For iflag = 0 to objrec.fields.count - 1
    %><td><% = objrec(iflag) %></td>
    <%
    Next
    %>
    </tr>
    <%
    objRec.Movenext
    Wend
    %>
    Hope this helps

    Ian
    Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width