Data.SqlExpr.TSQLDataSet.SQLConnection

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type: property
Visibility: published
Source:
Data.SqlExpr.pas
Data.SqlExpr.hpp
Unit: Data.SqlExpr
Parent: TSQLDataSet

Delphi

property SQLConnection;

C++

__property SQLConnection;

Description

Specifies the SQL connection component that connects the dataset to a database server.

Data.SqlExpr.TSQLDataSet.SQLConnection inherits from Data.SqlExpr.TCustomSQLDataSet.SQLConnection. All content below this line refers to Data.SqlExpr.TCustomSQLDataSet.SQLConnection.

Specifies the SQL connection component that connects the dataset to a database server.

Use SQLConnection to specify an SQL connection object that connects the dataset to a database server.

At design-time, select from the list of available TSQLConnection components in the Object Inspector. At runtime, set SQLConnection to reference an existing TSQLConnection object.

SQLConnection should be the first property you set on the dataset. Only after the SQLConnection property is set can you use the Command Text editor to specify a query for the CommandText property or populate the dataset with data by setting Active to true. Similarly, SQLConnection must be set before the dataset can initialize the Params property when you set CommandText.

See Also