ASP Is Fun

Learning ASP
Free Course
Basics
Functions
SQL Commands
Sample Code

Servers / Setup
Host Reviews
Server Setup
Error Tips

Contract ASP
Development

Intro to ASP



 


MoveNext Record Set Function



When you're working with a set of records in ASP, you want some way to move from record to record. The MoveNext function lets you do that.

Let's say you select all writers from your database with a statement like

SQLText = "select FirstName, LastName from writers order by LastName, FirstName"

You go through all the defining and opening of your record set and now want to move by them one by one, to put each one on your screen. You would say:

do while not objRec3.EOF
response.write objRec3("firstname") & " " & objRec3("lastname") & "
"
objRec3.MoveNext()
loop

If you did NOT do the MoveNext, the record wouldn't move on to the next record. You would keep printing out the same record, over and over again, until your server went insane and locked up :)

Really, infinite loops are REALLY bad for your system. Make sure you always have your records advancing properly before you test out your code!

ASP SQL Commands


ASP Main Page | ASP Ebooks | Free ASP Course | Contact Lisa
All content copyright © 2008 Minerva WebWorks LLC. All rights reserved.

Italian Wedding


Free Newsletter!

Ebooks
Intro to ASP
ASP SQL DB
Members
Shopping


Introduction to ASP

Romance Tips
Irish Romance
Italian Romance
French Romance

ASP Poll
How do you handle 500 errors?
I don't
Page does nothing
Displays error
Emails error