Show: Delphi C++
Display Preferences

Connecting to Databases - Overview

From RAD Studio
Jump to: navigation, search

Go Up to Connecting to Databases Index


Most dataset components can connect directly to a database server. Once connected, the dataset communicates with the server automatically. When you open the dataset, it populates itself with data from the server, and when you post records, they are sent back the server and applied. A single connection component can be shared by multiple datasets, or each dataset can use its own connection.

Each type of dataset connects to the database server using its own type of connection component, which is designed to work with a single data access mechanism. The following table lists these data access mechanisms and the associated connection components:

Database connection components :

Data Access Mechanism Connection Component

dbExpress

Data.SqlExpr.TSQLConnection

ActiveX Data Objects (ADO)

Data.Win.ADODB.TADOConnection

InterBase Express

IBX.IBDatabase.TIBDatabase

Borland Database Engine (BDE)

Bde.DBTables.TDatabase

Warning: The Borland Database Engine (BDE) has been deprecated, so BDE will not be enhanced. For instance, BDE will never have Unicode support. You should not undertake new development with BDE. Consider migrating your existing database applications from BDE to dbExpress.
Note: For a discussion of some pros and cons of each of these mechanisms, see Using Databases.

The connection component provides all the information necessary to establish a database connection. This information is different for each type of connection component:

Although each type of dataset uses a different connection component, they are all descendants of Data.DB.TCustomConnection. They all perform many of the same tasks and surface many of the same properties, methods, and events.

The following topics discuss many of these common tasks:

See Also

Personal tools
RAD Studio 10.2 Tokyo
In other languages
Previous Versions
Assistance