Data.SqlExpr.TCustomSQLDataSet.SQLConnection

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property SQLConnection: TSQLConnection read FSQLConnection write SetConnection;

C++

__property TSQLConnection* SQLConnection = {read=FSQLConnection, write=SetConnection};

Properties

Type Visibility Source Unit Parent
property public
Data.SqlExpr.pas
Data.SqlExpr.hpp
Data.SqlExpr TCustomSQLDataSet

Description

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