Delphi-Kylix
  Home arrow Delphi-Kylix arrow Page 2 - Using Delphi with ADO
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Actuate Whitepapers 
Moblin 
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? 
DELPHI-KYLIX

Using Delphi with ADO
By: Jacques Noah
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 5
    2006-10-02

    Table of Contents:
  • Using Delphi with ADO
  • Accessing Database Content
  • Practical Example with Data Aware Components
  • Practical Example Without Data Aware Components

  • 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

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Using Delphi with ADO - Accessing Database Content


    (Page 2 of 4 )

    Delphi 7, which I'm using for this article, ships with a host of ADO components,  located on the ADO tab. There you will find ADOTable, ADOQuery, and so on. These are mostly referred to as Datasets. There are two ways to access data in a database using ADO:

    1. Through Data Aware components located on the Data Controls tab. These components connect to a dataset through a datasource, and enable you to view the contents of a database. The components also enable you to manipulate records in a database without writing a single line of code. The downside of this approach is:

      • They use a lot of memory, compared to ordinary components.
      • They are not very flexible, and therefore not suitable for most real world database applications.
    2. Through ordinary components, programmatically. This approach gives you more flexibility and greatly improves the chances of you creating effective real world database applications.

    To access database content in Delphi, we need what is called a connection string. A connection string tells the application where the database is located on your hard disk. This property is available in all ADO datasets. If you develop your applications with data aware components, you are going to need a datasource component. This component is located on the Data Access tab, and acts as a connector that connects datasets (for example ADOTable) to a data aware component, such as a DBGrid. In the example below, I will demonstrate how the components are connected together.

    More Delphi-Kylix Articles
    More By Jacques Noah


       · the database "people.mdb" is missing from the download. Any chance of having the...
       · OK the MDB file is in the zip now but.... there are no tables in the database???
       · I'll have a look at the file and upload a proper one. Thanks.
       · it seems that mister Jacques Noah forgot about the common people in his quest for...
     

    DELPHI-KYLIX ARTICLES

    - Client Dataset: Working with Data Packets an...
    - Using the Client Dataset in an N-Tiered Appl...
    - Using the Client Dataset in Two-Tiered Clien...
    - Using the Client Dataset in File-Based Archi...
    - Demystifying the Client Dataset
    - Working with INI Files in Delphi
    - Creating Data Link (UDL) Files in Delphi
    - Looking at the Details for an Invoicing Appl...
    - Invoicing in Delphi: Show Me the Money
    - Saving Images and Binary Files to a Database...
    - Saving Files to a Database using Delphi: Sav...
    - Creating CF Applications and Integrating a S...
    - Using Try and Finally to Help Prevent Memory...
    - The Implementation of an FTP Server
    - FTP Server: The Theory







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway