Posted: Sun Jul 16, 2006 4:02 am Collecting a whole database field into a single variable?
I am trying to collect a whole database field into a single variable, I have go this far. If you look at the response.write loop that is the information I am trying to collect into the variable (in that format).
Code: set cnn = Server.CreateObject("ADODB.Connection")
set rst = Server.CreateObject("ADODB.RecordSet")
cnn.Open "driver={Microsoft Access Driver (*.mdb)};;DBQ=c:/inetpub/wwwroot/intranet/login.mdb;"
sqltext = "SELECT username FROM userinfo"
rst.open sqltext,cnn
while not rst.EOF
response.write """" & rst("username") & """, "
rst.MoveNext
wend
rst.close
cnn.close
set rst = nothing
set cnn = nothing
degsy
Joined: 23 Feb 2005
Posts: 2440
Location: North East, UK