Re: Referencing data column by it's name



nospam@xxxxxxxxx wrote:
here's my code:

<%

set conn = server.createobject("ADODB.Connection")
conn.open "databasename"

set rs = conn.execute("select * from myTable")

http://www.aspfaq.com/show.asp?id=2096


var_firstname = rs(1)

This is the most efficient way to refer to a column (or any item in any
collection) .... bar none. Why do you want to change?


// THE NAME OF COLUMN 1 IS FirstName


rs("Firstname") will work, but what is the need?



--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


.



Relevant Pages