ADO Recordset properties and movement

An ADO Recordset keeps a current-row position while you browse query results. The cursor type used when the Recordset is opened determines which movement operations are available.

EOF

EOF becomes true after the current position moves beyond the last record. A forward-reading loop normally checks Do While Not rs.EOF before reading fields.

BOF

BOF indicates that the current position is before the first record. If a Recordset opens with no rows, both BOF and EOF are true and there is no current record.

MoveNext

MoveNext advances to the next row. Calling it when EOF is already true raises an error, so a normal loop stops when EOF becomes true.

MovePrevious, MoveFirst and MoveLast

Backward movement and direct first/last navigation require a Recordset/cursor that supports those operations. A forward-only Recordset is designed primarily for sequential MoveNext access.

RecordCount

RecordCount is cursor/provider dependent and can return -1 for a forward-only cursor. When you only need a count, a SQL COUNT(*) query is usually clearer and avoids opening a scrollable cursor just to count rows.


ASP Home






✖
We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles Contact us
© 2000-2026 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer