TenVolt
                          Tech Notes
ASP > Database articles:

  How do I get a RecordSet (a bunch of records) from a database using ASP?  Read
 • Once I have my RecordSet (a bunch of records) from my database, how do I loop through the records and display them using ASP?

Return to index of articles

Once I have my RecordSet (a bunch of records) from my database, how do I loop through the records and display them using ASP?

Category: ASP
Category: Database

<% if rsName.EOF then response.write("No records found.") else do until rsName.EOF response.write( rsName("fieldName1") ) response.write( " - " ) response.write( rsName("fieldName2") ) response.write( "
" ) ' ETC... rsName.moveNext loop end if %> Don't forget to close your objects and get rid of them so they can be returned to the connection pool:

rsName.close
set rsName=NOTHING
Conn.close
set Conn=NOTHING


9/2/2003

 TuneVault
 Music & MP3's
 10v Calendar
 Online & Easy
 Craigger
 Various & Misc.
 RetroVault
 Toys Toys Toys!
   

All contents ©2003 Ten Volt Consulting. All rights reserved.
Unauthorized duplication or use is a violation of applicable laws.
Webmaster Contact