Bookmarking and Moving through Records with ADO
(Page 1 of 4 )
In this tutorial we will see some of the basic features of ADO's recordset as applied to data retrieved using a simple select statement on a table in the Northwind sample database. You will also see how you may bind the data to controls which are unbound at design time using code.
Introduction
Moving through the recordset is often required while, for example, trying to locate a record in order to review it or make changes to it. The ability to come back to a given record after traversing the records is equally important. ADO supports this ability through several of its methods. However, since it has several ways of supporting the functionality of recordsets, this ability to move freely is restricted to those cursor types that support free movement
This tutorial will assume that the reader has reviewed the first three tutorials on ADO's connection object and the recordset object (listed below). Only a few of the properties of the recordset object were described; in the present tutorial you will see a number of methods related to navigation through the data. This tutorial also shows how you may bind the data to controls which are unbound at design time using code.
The first three tutorials on ADO include "Cursors in MS Access and ADO," "Using the Recordset with MS Access and ADO," and "Connecting to Microsoft Access with ADO," with the most recent one listed first. Please click on the links if you need to refresh your memory or have not read these articles before.
Review of Properties and methodsHere is a bulleted review of properties and methods from the three previous tutorials. Some aspects of moving the data were discussed to clarify the BOF, EOF properties in the context of cursor type property. In this tutorial a few more properties needed for bookmarking records and moving through the records will be discussed.
- Connection Open()
- Connection Close()
- Connection Version
- Connection State
- Connection ConnectionTimeout
- Recordset Status
- Recordset CursorType
- Recordset CursorLocation
- Recordset ActiveConnection
- Recordset AbsolutePosition
- Recordset LockType
- Recordset RecordCount
- Recordset BOF
- Recordset EOF
- Recordset MoveNext
- Recordset MovePrevious
- Recordset MoveFirst
Next: Accessing data fields and rows in a recordset >>
More ASP.NET Articles
More By Jayaram Krishnaswamy