Data.Win.ADODB.TADOCommand.Connection

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type: property
Visibility: published
Source:
Data.Win.ADODB.pas
Data.Win.ADODB.hpp
Unit: Data.Win.ADODB
Parent: TADOCommand

Delphi

property Connection: TADOConnection read FConnection write SetConnection;

C++

__property TADOConnection* Connection = {read=FConnection, write=SetConnection};

Description

Specifies ADO connection component to use.

Set Connection to specify the TADOConnection the command component uses to connect to the data store.



ADOCommand1.Connection := ADOConnection1;



ADOCommand1->Connection = ADOConnection1;



Note: the connection of an ADO command component to a data store can either be through a TADOConnection specified in the Connection property or directly through the connection string specified in ConnectionString. These two properties are mutually exclusive.

See Also