printing out a record set backwards

This is a discussion on "printing out a record set backwards" within the Classic ASP section. This forum, and the thread "printing out a record set backwards are both part of the Program Your Website category.



 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices


Reply
 
LinkBack Thread Tools
  #1  
Old Feb 10th, 2006, 17:37
Junior Member
Join Date: Nov 2005
Age: 26
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
printing out a record set backwards

let's say that i have 4 elements in the record set. but instead of printing them out in order i want to go backwards like so..

4 3 2 1

how would one accomplish this? I've tried moving to the 4th element and using the moveprevious command but that doesn't seem to work.


any help? thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Feb 11th, 2006, 13:37
Rob's Avatar
Rob Rob is offline
Webforumz Founder
Join Date: Jul 2003
Location: Southern UK
Age: 34
Posts: 3,160
Blog Entries: 7
Thanks: 27
Thanked 19 Times in 16 Posts
Re: printing out a record set backwards

you would need to use

rs.movelast
for myloop = rs.recordcount to 1 step -1
'do something
rs.moveprevious
next

.... or something very similar.
__________________
Click the 'Thanks!' button if this post has helped you

Rob - Webforumz Founder
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Feb 15th, 2006, 22:55
Up'n'Coming Member
Join Date: Feb 2004
Location: Woodbridge, UK
Age: 27
Posts: 80
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation Re: printing out a record set backwards

You can do as Rob said, but bad form in my opinion. Better to put a proper ORDER BY in your SQL.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Feb 16th, 2006, 14:12
Junior Member
Join Date: Nov 2005
Age: 26
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Re: printing out a record set backwards

yeah, i ended up just ordering them by DESC in my sql statement. thanks for the help though.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Feb 20th, 2006, 13:13
Rob's Avatar
Rob Rob is offline
Webforumz Founder
Join Date: Jul 2003
Location: Southern UK
Age: 34
Posts: 3,160
Blog Entries: 7
Thanks: 27
Thanked 19 Times in 16 Posts
Re: printing out a record set backwards

Lol...... I could hit myself.
__________________
Click the 'Thanks!' button if this post has helped you

Rob - Webforumz Founder
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
printing, record, set, backwards

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing Jack Franklin Webforumz Cafe 5 Jun 13th, 2008 12:04
[SOLVED] Reading as text file backwards eon201 PHP Forum 4 Nov 8th, 2007 10:53
Printing single record from Access via Report in Web Page Neotekk JavaScript Forum 0 Jun 18th, 2007 15:20
backwards script ST JavaScript Forum 3 Jan 12th, 2006 21:37
printing spinal007 Web Page Design 2 Nov 17th, 2004 13:37


All times are GMT. The time now is 19:37.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42