TSQLDataset should be used for SQL statements which either do not return a result set or where the result set can be used in an unidirectional / read-only way.
It is more efficient to use TSQLDataset than to use TClientDataset when dealing with unidirectional / read-only result sets.
Note that it is possible to update a record using TSQLDataset with an SQL statement such as
Code:
UPDATE customer SET credit=100 WHERE id=1234
TSQLDataset is very efficient when updating all the records in the table (especially when the table is on a remote computer)
Code:
UPDATE customer SET credit=100
TClientDataset should be used if bi-directional support is required (for example to populate a TDBGrid), when the current record is to be updated or when a what-if type scenario is to be investigated.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.