API:Data.SqlExpr.TSqlServerMethod.SQLConnection

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property SQLConnection;

C++

__property SQLConnection;

Properties

Type Visibility Source Unit Parent
property published
Data.SqlExpr.pas
Data.SqlExpr.hpp
Data.SqlExpr TSqlServerMethod

Description

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

Data.SqlExpr.TSqlServerMethod.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