Microsoft Access
  Home arrow Microsoft Access arrow Page 4 - Cursors in MS Access and ADO
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
MICROSOFT ACCESS

Cursors in MS Access and ADO
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 9
    2006-05-03

    Table of Contents:
  • Cursors in MS Access and ADO
  • ADO Cursors
  • The Recordset's RecordCount, AbsolutePosition, BOF and EOF properties
  • CursorType changed to adOpenForwardOnly

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Cursors in MS Access and ADO - CursorType changed to adOpenForwardOnly


    (Page 4 of 4 )

    If you change the CursorType property in the above code from being adOpenStatic to adOpenForwardOnly and try to run the application, you will end up with a run time error because going back is not permitted and the first time you try to do so (using MovePrevious), an error will be generated and you will get the following message:

    Now if you try to debug, you will be guided to the highlighted line as shown.

    Summary

    In this tutorial we have seen some of the basic features of ADO's cursors as applied to data retrieved using a simple select statement on a table in the Northwind sample database. Not all OleDB providers provide all cursor types. This brings us to another important property not discussed, namely Recordset's Supports property which takes the property or method as an argument. Most importantly we have seen the different kinds of cursors that are used and two simple examples of how they change the functionality of retrieved data.

    Record navigation was discussed in the context of cursors, although in addition to MovePrevious, MoveLast, and MoveNext there are also MoveFirst and Move (which takes two optional arguments, how many steps to move and starting from where). We will look at record navigation when bound to a form in another tutorial. When data changes are to be made using action queries the cursor location property becomes very important. The LockType and CacheSize properties were not discussed, but that will be rectified in a future tutorial.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · The tutorial is written targeting the beginner and so the discussion is at its very...
       · These are excellent articles and I am enjoying reading them. We all have to start...
     

    MICROSOFT ACCESS ARTICLES

    - Linking SQL Express 2005 Tables to MS Access...
    - Working with Access Projects in Access 2007
    - Exploring Access 2007
    - Working with Stored Procedures in an MS Acce...
    - Creating and Using Action Queries
    - Creating Data Access Pages with Charts using...
    - Advanced Ideas using VBA
    - VBA Details
    - Updating Records in MS Access
    - Using ADO`s Record Object with URLs
    - Exporting XML from MS Access 2003
    - Importing XML into MS Access 2003
    - On Using Pass-through Queries in MS Access
    - Distributed Queries in MS Access
    - Configuring a Linked Microsoft Access Server...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
    Stay green...Green IT