Looping with Tables

Results 1 to 3 of 3

Thread: Looping with Tables

  1. #1
    Join Date
    Dec 1969

    Default Looping with Tables

    I want to loop through a recordset which is displayed in tables.<BR><BR>Where is the best place to put the loop elements (the Do WhileNot and the MoveNext Loop) - inside the table or outside?<BR><BR>Or does it matter?<BR>Does anything?

  2. #2
    Join Date
    Dec 1969

    Default RE: Looping with Tables

    The most frequent approach I&#039ve seen is the recordset loop outside of the HTML statements that render the table. I&#039m not even sure there is an adequate method to do it the other way around since you are moving through the data source and display each row as your passing it. The same principle is applied to arrays as well.<BR>Hope this helps,<BR>Thomas

  3. #3
    Corin Guest

    Default RE: Looping with Tables

    It depends on how you want the layout to exist. If you have mutiple &#060;TD&#062;&#039s in the same &#060;TR&#062; your going to have to dynamically calculate the number of records. You should definatly put the While not rs.eof inside the &#060;TABLE&#062;, remember each loop is going to generate new &#060;TABLE&#062; &#060;TR&#062; and &#060;TD&#062; tags.<BR><BR>It&#039s all in how you want to lay it out

Posting Permissions

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