Search code examples
delphibde

Is TDBCtrlGrid a generic data aware component?


I am planning to move away from BDE and dBase so, while implementing some application I need to stay away from everything that could make the transition more difficult. I wonder, for instance, if data aware components like TDBCtrlGrid is toot tied in some way to the BDE or not.


Solution

  • Db-aware components like the TDBCtrlGrid, TDBGrid, TDBEdit, etc, should all work fine with more modern TDataSet-descendants than TQuery, TTable, etc. So the answer to your q is that they are all generic.

    The whole point of the design of Delphi's db-aware components is that the access model they use is abstracted from any particular dataset implementation and so will work with any TDataSet descendant, because TDataSet itself implements an abstracted data-access model.

    Delphi's db-aware components work at two steps removed from TDataSet, and interact with it (or any descendant of it) via TDataSource and TDataLink and its descendants. All data interactions occur via TDataLinks - see the source in DB.Pas.