Just as an aside, do you need to select the fields you're ordering by? In most situations you can just include them in the order by clause and not select them.
Also, if you wanted to start from the second you'd need to use for i = 1 to n, not for i = 0 to n as I mistakenly put. Dan www.diado.com -----Original Message----- From: Chris Hagwood [mailto:[EMAIL PROTECTED] Sent: 10 September 2004 14:25 To: [EMAIL PROTECTED] Subject: [ASP] List Field Names I would like to list the first n field names, but I'm not having luck. For example, I can list data in the 2nd through last fields by using this: For j = 1 to maxFields-1 Response.Write objRS(j) Next What tells it to use the field name similarly? I can write them ALL using this: For Each fd in objRS.Fields Response.Write fd.Name Next But, I don't want them all, in fact, I want the 2nd through the 3rd from last (I query fields that I do not want to display, but I use them to ORDER BY). [Non-text portions of this message have been removed] --------------------------------------------------------------------- Home : http://groups.yahoo.com/group/active-server-pages --------------------------------------------------------------------- Post : [EMAIL PROTECTED] Subscribe : [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] --------------------------------------------------------------------- Yahoo! Groups Links ------------------------ Yahoo! Groups Sponsor --------------------~--> Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar. Now with Pop-Up Blocker. Get it for free! http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/17folB/TM --------------------------------------------------------------------~-> --------------------------------------------------------------------- Home : http://groups.yahoo.com/group/active-server-pages --------------------------------------------------------------------- Post : [EMAIL PROTECTED] Subscribe : [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] --------------------------------------------------------------------- Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/active-server-pages/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
