Something like this should do it :-
for i = 0 to n
response.write objRS.Fields(i).Name
next i
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 --------------------~-->
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/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/