delphi – What is the difference between TSQLDataSet, TSQLQuery, TSQLTable and TSQLSimpleDataSet components?

Question:

In Delphi, following the line of the components TTable and TQuery existing in the component palette BDE we also have similar components in the palette dbExpress that are TSQLQuery and TSQLTable , plus we have the components TSQLDataSet and TSQLSimpleDataSet .

I see for example that TSQLSimpleDataSet incorporates properties and methods such as a ClientDataSet , CreateDataSet , Data and Delta , for example.
Certainly such components exist because a specific purpose exists for each of them and they cannot all simply serve the same purpose.

I believe this is a basic but very important foundation for Delphi programmers

So:
What is the difference between these components? A practical application would be interesting!
To be clear, I'm asking about each component mentioned. Not by the BDE palette or the dbExpress .

Answer:

What is the reason for the TSimpleDataSet?

The set TSQLQuery + TDataSetProvider + TClientDataSet has many features and is widely used, but there are cases of client server applications where the developer wants to use something simpler, something like a TSimpleDataSet which is actually the set mentioned above incorporated in a single component.

What about TSQLQuery and TSQLDataSet?

As you can see in this link , Bruno Lichot (who was an Embarcadero evangelist in Brazil) explains that TSQLQuery was sent for compatibility and that TSQLDataSet is his evolution, doing the same things, but having more features. Both are database query objects.

What about TSQLTable?

It's a simpler database query tool, which doesn't do custom database queries, just load the contents of a table, something like a 'SELECT * FROM table'

Scroll to Top