Cursors in MS Access and ADO
(Page 1 of 4 )
In multi-user, multi-tier distributed application scenarios where one has to provide the most current data possible, keeping the network traffic low can be challenging. The idea of using cursors becomes very appealing by offering different ways of showing the data. This tutorial, the third in a series covering MS Access and ADO, looks at cursors.
Introduction
This tutorial looks at the cursors, elements that allow the viewing of data in specialized ways. Cursors define the functionality of a specific recordset. ADO reaches out to the data through OleDB object -- the recordset, to get the data stored in a data structure called the cursor. The ADO Cursor engine sits between ADO and the OleDB.
Different cursors endow different functionalities to the recordset. Some cursors allow you to see data in real time (data changes as they are being made when you are working with the recordset), some allow only a "snapshot" of the data existing at a particular point in time. Also while some may allow you to move through the data up and down (or left and right), some others lets you do so only in the forward direction. In ADO there are four types of cursors. This tutorial shows how the four cursors define the functionality of the recordset when Recordset's cursor property is predefined.
This tutorial assumes that the reader has reviewed the first two tutorials on ADO's Connection object and the Recordset object which have appeared on the ASPFree.com site. Only a few of the properties of the recordset object were described. In the present tutorial you will see that a knowledge of cursors is essential to understanding the properties related to navigation in the data, the updatability of data and other issues. Complete examples will be given that may function as a ready reference for understanding the cursors. Although only one of the cursor types (adOpenStatic) is described using coding in detail, future tutorials will describe the others in similar detail.
Next: ADO Cursors >>
More Microsoft Access Articles
More By Jayaram Krishnaswamy