Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


How do I get data into a TClientDataset ? by towerbase
Posted: 14 Jan 04 (Edited 23 Jul 04)

TDatasetProvider provides the mechanism to get data into a TClientDataset.  

TDatasetProvider is like a pipe connecting TClientDataset with TSQLDataset.

Typically if you want to show records from your database table on a TDBGrid in your application then you will need the following components.

TSQLConnection to provide the necessary connection details to the database.  One TSQLConnection can service several TSQLDatasets.

A TSQLDataset component which will specify the TSQLConnection component in the SQLConnection property.  The CommandText property of the TSQLDataset will have a suitable SQL statement such as


SELECT * FROM customer WHERE balance>100 ORDER BY balance
A TDatasetProvider component which will specify the TSQLDataset in its Dataset property.

A TClientDataset component which will specify the TDatasetProvider in its ProviderName property

A TDataSource component which will specify the TClientDataset component in its Dataset property.

A TDBGrid component which will specify the TDataSource in its DataSource property.

By setting the appropriate Active properties to true in TSQLConnection, TSQLDataset and TClientDataset you should find that the data will appear in the grid.

Back to Embarcadero: Delphi FAQ Index
Back to Embarcadero: Delphi Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close