From .EOF to .BOF

Results 1 to 3 of 3

Thread: From .EOF to .BOF

  1. #1
    J. Bruijn Guest

    Default From .EOF to .BOF

    Say I have a table and one of my columns goes from 1 to x.<BR>Now normally I&#039d use:<BR><BR> &#060;% do while not somename.eof %&#062;<BR><BR> .....<BR><BR> &#060;% somename.movenext<BR> loop%&#062;<BR><BR>and I&#039ll get everything from 1 to x.<BR><BR>So, but what if I want the results from x to 1, so from .EOF to .BOF??? Is there a way to do that?<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: From .EOF to .BOF

    One way of solving this is the following:<BR><BR>Let&#039s say that you have a SQL looking like this:<BR>SQL = "SELECT * FROM table ORDER BY something"<BR>This SQL is ordered ascending, which means that the smallest value will be posted at first. What you want to do, is ordering the field descending (the largest value at first).<BR>By adding DESC at the end of your SQL, this will be solved:<BR>SQL = "SELECT * FROM table ORDER BY something DESC"<BR><BR>Nick

  3. #3
    Join Date
    Dec 1969

    Default RE: From .EOF to .BOF

    You could do something like this if you did not want to reorder the result set as stated above.<BR><BR>rst.MoveLast<BR>Do While not rst.BOF<BR>...<BR>rst.MovePrevious<BR>Loop<BR><BR> HTH<BR><BR>Jerry

Posting Permissions

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