RAD Studio for Microsoft .NET |  |

dbExpress Components overview
Connection Strings | dbExpress Components | See Also
Collapse All

dbExpress is a set of lightweight database drivers that provide fast access to SQL database servers. For each supported database, dbExpress provides a driver that adapts the server-specific software to a set of uniform dbExpress interfaces. When you deploy a database application that uses dbExpress, you might need to include a DLL (the server-specific driver) with the application files you build. For example, DbxClient is a 100% Delphi driver and needs no DLL.

dbExpress lets you access databases using unidirectional datasets. Unidirectional datasets are designed for quick lightweight access to database information, with minimal overhead. Like other datasets, they can send an SQL command to the database server, and if the command returns a set of records, obtain a reader for accessing those records. However, unidirectional datasets can only retrieve a unidirectional reader. They do not buffer data in memory, which makes them faster and less resource-intensive than other types of dataset. However, because there are no buffered records, unidirectional datasets are also less flexible than other datasets.

dbExpress connections, tables, views, and stored procedures that show up in a data tree view support drag and drop with native and managed VCL forms.

Connection Strings

In dbExpress 4, all connection properties, including ConnectionString, are passed to the driver at connect time.

The ConnectionString property in dbExpress allows you to pass all database options and connection information (database, username, password) by means of a single connection string. This feature also allows you to introduce new properties to your drivers in the middle of a release by changing an interface.

You can load the ConnectionProperties in the dbxconnections.ini for the current connectionName by right clicking the connection and selecting the appropriate menu item. This creates a Parameters item (Parameters['ConnectionString']) that contains all of the connection properties in the inifile. This way you can add new properties to the dbxconnections.ini file, and you don't have type the whole string in yourself.

There is also a 'Clear Connection String' menu item off the SqlConnection right click menu, which appears whenever the ConnectionString property is set.

dbExpress Components

The dbExpress section of the Tool Palette contains the following components that use dbExpress to access database information:

Component | Function
TSQLConnection | Encapsulates a dbExpress connection to a database server
TSQLDataSet | Represents any data available through dbExpress, or sends commands to a database accessed through dbExpress
TSQLQuery | A query-type dataset that encapsulates a SQL statement and enables applications to access the resulting records, if any
TSQLTable | A table-type dataset that represents all of the rows and columns of a single database table
TSQLStoredProc | A stored procedure-type dataset that executes a stored procedure defined on a database server
TSQLMonitor | Intercepts messages that pass between a SQL connection component and a database server and saves them in a string list
TSimpleDataSet | A client dataset that uses an internal TSQLDataSet and TDataSetProvider for fetching data and applying updates

See Also

VCL for .NET Overview

Porting VCL Applications

Deploying Database Applications for the .NET Framework

Building a VCL Forms dbExpress.NET Database Application

Configuring TSQL Connection

Using Data Explorer to get Connection Information

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!