Difference between revisions of "TDataSource"
From Lazarus wiki
Jump to navigationJump to searchLine 9: | Line 9: | ||
== See also == | == See also == | ||
− | * [[doc:fcl/db/tdatasource.html|TDataSource]] | + | * [[doc:fcl/db/tdatasource.html|TDataSource doc]] |
+ | * [[TSQLTransaction]] | ||
+ | * [[TSQLQuery]] | ||
{{LCL Components}} | {{LCL Components}} | ||
[[category:Databases]] | [[category:Databases]] |
Revision as of 17:32, 8 August 2016
TDataSource is a component that mediates communication between a TDataSet based component that represents the database contents and Data Controls like TDBGrid.
Typically, a TDataSource contains a field 'DataSet' that connects to a TSQLQuery or other TDataSet descendant. The DataSource should connect to the 'DataSource' field of a TDBGrid or other Data Control component.
SQLTransaction1.Database := SQLConnection1; SQLQuery1.Transaction := SQLTransaction1; DataSource1.DataSet := SQLQuery1; DBGrid1.DataSource := DataSource1;
See also