ASP.NET
  Home arrow ASP.NET arrow Binding Data to Controls with MS Access an...
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? 
ASP.NET

Binding Data to Controls with MS Access and ADO
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 11
    2006-06-14

    Table of Contents:
  • Binding Data to Controls with MS Access and ADO
  • Retrieving and displaying data using text boxes
  • Code to retrieve the recordset
  • Populating a combo box
  • Displaying the combo box
  • Displaying a list box

  • 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


    Binding Data to Controls with MS Access and ADO


    (Page 1 of 6 )

    This basic tutorial is targeted to those who want to develop Microsoft Access front end applications using ADO, or for those who are using DAO/RDO and want to move into ADO. This tutorial shows you how you may wire up the text boxes, combo boxes and list boxes to the underlying database using Microsoft's ActiveX Data Objects (ADO).

    Introduction

    The ubiquitous combo boxes, list boxes and text boxes provide the visual and interactive links to decision support systems because they are extensively used in GUI front ends. These controls maintain a connection to the underlying data by their ControlSource property. Connections to the underlying table create read locks, and if modification is involved then there will also be write locks. Since decision support systems work mostly with archived data, most of the activity will be centered around data that is read-only. In a multi-user scenario, these locks impose a limit preventing data access. Methods and practices to design these controls can help mitigate these locking-related bottlenecks. Since some of these controls do not need data that can be traversed in both directions (navigable recordsets), a connection that furnishes a fast "fill" of these controls is all that is needed.

    Also, decisions in decision support systems are made by non-programmers who are more at home fine tuning their data-lookup with a number of constraints (fine tuning of queries against the database) they can apply and immediately see the value of interest. In these cases, to void any kind of data input error, a combo box (list box) presentation of choices to impose constraints for fine-tuning is more meaningful. Please review this article on an MS Excel application looking up data in a OLAP server where such a user interface is built in. This article builds on the earlier ADO related articles on this site to show how you may bind these controls to the recordsets provided by ADO, and how to populate them with data.

    Data access using code

    In this tutorial the Shippers table in the Northwind.mdb database will be used. Using ADO, the database will be accessed. The Northwind database is not resident on the Access application. The connection to the database on the local machine is achieved by means of ADO. The query against the database will return a recordset which will be the control source for the form. The controls on the form are unbound because there is no database locally present. The binding is achieved at run time.

    More ASP.NET Articles
    More By Jayaram Krishnaswamy


       · The predominance of Microsoft products, especially its Office is primarily because...
       · Very good explanation.I couldnt get mine to work for a while, but then I took...
     

    ASP.NET ARTICLES

    - ASP.NET DotNetNuke Installation with Visual ...
    - Using ASP.NET with a MySQL Database
    - Using ASP.NET with an MS Access Database
    - Adding Content to a Static ASP.NET Website
    - Building a Static ASP.NET Website in a Basic...
    - Develop Your First ASP.NET Website with Visu...
    - Run ASP.NET in Windows XP Home with Cassini ...
    - How to Test a Web Application
    - How to Add Code and Validation Controls to a...
    - Working in Source and Split Views to Build a...
    - How to Build a Web Form for a One-Page Web A...
    - How to Develop a One-Page Web Application
    - An ASP.NET Web Application in Action
    - Developing ASP.NET Web Applications
    - An Introduction to ASP.NET Web Programming





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