1. Home
  2. Computing & Technology
  3. Delphi Programming

Data Browsing and Navigation in Delphi Database Applications

By , About.com Guide

2 of 6

Data Controls; Data Source; Datasets

Delphi's data-aware controls are components that normally reside on a Standard palette tab but have been modified to display and manipulate the content of data in a dataset (table or query). The choice of controls is determined by how we want to present the information and how we want to let users browse (and manipulate - add or edit) through the records of a dataset.

DBEdit and DBMemo, for example, are used to represent an individual record from a dataset. The DBGrid, on the other hand, is generally used when displaying the contents of an entire dataset.

Since all the data-aware controls are counterparts to the standard Windows controls - with a few extra properties, building a functional database application should be a relatively familiar task. All the data-aware components share one common property: data source.

Data Source

Simply put, the TDataSource component provides a mechanism to hook dataset components to the visual data-aware components that display the data. You generally will need one datasource component for each dataset component to present a link to one or more data-aware controls. Datasets To create an ADO based application, Delphi provides us with four dataset components: TADODataSet, TAdoTable, TADOQuery and TADOStoredProc. All the components are designed to retrieve, present and modify the data. All those components can connect directly (as like in the previous chapter's examples) to an ADO data store (such as data in an Access database) through the ConnectionString property or they can chare a single connection. When connecting through a TAdoConnection the Connection property specifies an ADO connection object to use to connect to an ADO data store.
Explore Delphi Programming
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming
  4. Build Database Applications
  5. Data Browsing and Navigation in Delphi Database Applications - TDataset, Data-Aware Controls

©2009 About.com, a part of The New York Times Company.

All rights reserved.