Microsoft Access
  Home arrow Microsoft Access arrow Using the Recordset with 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  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
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

Using the Recordset with MS Access and ADO
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 14
    2006-04-26

    Table of Contents:
  • Using the Recordset with MS Access and ADO
  • The Recordset Object, Properties, Methods and events
  • Write code to Open ADODB connection, Recordset and close open objects
  • Review recordset properties using code

  • 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


    Using the Recordset with MS Access and ADO


    (Page 1 of 4 )

    A Connection object may give you access to the database, but that's only half the equation; the Recordset object gives you access to the data. Keep reading to learn more about the Recordset.

    Introduction

    In "Connecting to MS Access with ADO," the Connection object was described with some details. The Open and Close methods of a connection object were described. Also described were the ADO Version, Connection timeout, Connection string and Connection State properties and their usage. The Properties collection related to the Connection revealed a great deal of information on the connection for the source used. The properties and methods discussed so far are only a small part of all the methods and properties; a future tutorial will describe some of the other properties.

    This tutorial deals with the next important object, the Recordset object. If connection gave you access to the database, the recordset will give you access to the data. The result of a query run against a database is stored in a recordset. What you must do is to examine the recordset to find out what information is contained in your data. The recordset does a little more than that; you can sort a recordset, you can filter it and you can even update it. Now let's go back and take a look at the ADO Object model presented in the first tutorial, Part 1.

    The Recordset Object

    Starting from ADO 2.5, the ADO object model consists of five separate parts, each of which concentrates on a single high level object. The five objects of this model are the Connection, Command, Recordset, Record and the Stream. The last of these gives I/O access to data stored on a local machine. In the next couple of tutorials I will be exploring each of these objects in greater detail, providing concrete and full examples of their usage.

    This next picture shows the ADO object model from my earlier article. In this tutorial I will be concentrating on the Recordset, because the recordset is our main link to the data on the database. You may also notice the Record object's intimate association with the recordset object.

    As you can see from the above diagram, the recordset object exposes a Fields collection with a number of fields. The item field would correspond to a column in a table or a query. Hence the recordset is a collection of all the columns for that row or the set you requested in your query. This object has some 30 properties and an equally impressive 25 or so methods. This tutorial at this level of presentation will only look at some of the properties and a couple of methods.

    More Microsoft Access Articles
    More By Jayaram Krishnaswamy


       · ADO and ADO.NET will be the technologies you may need to pursue in the future....
       · Hi Jay,I was working with a form. The example you have given here perfectly...
       · From this page of the tutorial: ...
     

    MICROSOFT ACCESS ARTICLES

    - Converting a MySQL Database to an Excel Work...
    - 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





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek