RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomSQLDataSet.SQLConnection Property

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

Pascal
property SQLConnection: TSQLConnection;
C++
__property TSQLConnection SQLConnection;

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

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!