Posted by webmaster Guido
In Reply to Database application without BDE
Use Delphi's TClientDataSet components instead of TTable. TClientDataSet does not need the BDE, if you use it in combination with XML databases. TClientDataSet is a TDataSet descendant that holds data in a table-like structure consisting of rows (records) and columns (fields). Just like TTable, it lets you navigate, edit, add, delete, sort, search, and filter the database data.
ClientDataSet is available in the free Delphi Starter version.
A ClientDataSet can access database files on servers as well as on your local computer. What types of files? That depends on the database drivers that are installed, but by default it can read/write XML files and CDS files. We prefer to work with XML files because they are in a universal and human readable format, while CDS is a binary format introduced by Embarcadero.
Migrating (rewriting) desktop database applications for operation without the BDE is easy:
1. Replace all combinations of TTable/local-database-file (such as Paradox,
DBase,...) with combinations of TClientDataSet/XML-file.
2. Convert your local database files (Paradox, dBase,...) to XML files.
3. If your old program uses indexes, then you've got to add some source code for indexing the ClientDataSet(s).
4. Remove all DBE related stuff from your source code.
More details: see my next message.