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.



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

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Feb 10th, 2006, 17:37
Junior Member
Join Date: Nov 2005
Age: 25
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.
Reply With Quote

  #2 (permalink)  
Old Feb 11th, 2006, 13:37
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,952
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
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.
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
Reply With Quote
  #3 (permalink)  
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
Send a message via ICQ to Trebz Send a message via MSN to Trebz
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.
Reply With Quote
  #4 (permalink)  
Old Feb 16th, 2006, 14:12
Junior Member
Join Date: Nov 2005
Age: 25
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.
Reply With Quote
  #5 (permalink)  
Old Feb 20th, 2006, 13:13
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,952
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
Re: printing out a record set backwards

Lol...... I could hit myself.
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
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 21:03.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs 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 43