I'm doing some asp, but all of my experience is with linux and linux
related tools like python, php, mysql, etc.

Basically, I can't find any good resources for asp/vb script. Nothing
akin to the docs on python.org or php.net.

Here is my current problem. I have a result set I got from an adodb
connection and I want to loop through all the fields, but the number of
fields may vary. Here's my code.

If not RS.eof then
RS.movefirst
Do

'this doesn't work so how would I do this.
for each field in rs.fields
Response.write "Here is some Data " & field & "<br>"
next

Rs.movenext
Loop until RS.eof
End if


Basically, I don't know how to get the fields into a form that I can
loop through. Any help or links to good resources will be greatly
appreciated.

Re: new to asp by Gérard

Gérard
Tue Dec 14 12:36:18 CST 2004

www.aspFaq.com

For Each objField In objRecord.Fields
Response.Write objField.Name & "<br>"
Next




Re: new to asp by jeff

jeff
Tue Dec 14 21:39:34 CST 2004

On 14 Dec 2004 09:54:51 -0800, "jaydonnell" <jaydonnell@gmail.com>
wrote:

>I'm doing some asp, but all of my experience is with linux and linux
>related tools like python, php, mysql, etc.
>
>Basically, I can't find any good resources for asp/vb script. Nothing
>akin to the docs on python.org or php.net.

There's always:

http://www.devguru.com/Technologies/vbscript/quickref/vbscript_intro.html
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/vtoriVBScript.asp
http://ww.aspfaq.com/

>Here is my current problem. I have a result set I got from an adodb
>connection and I want to loop through all the fields, but the number of
>fields may vary. Here's my code.
>
>If not RS.eof then
>RS.movefirst
>Do
>
>'this doesn't work so how would I do this.
>for each field in rs.fields
>Response.write "Here is some Data " & field & "<br>"
>next
>
>Rs.movenext
>Loop until RS.eof
>End if
>
>
>Basically, I don't know how to get the fields into a form that I can
>loop through. Any help or links to good resources will be greatly
>appreciated.

Check this list of tutorials and samples for using record sets:

http://www.google.com/search?hl=en&lr=&q=asp+recordset+tutorial

Jeff