Posted by webmaster Guido on January 10, 2008
In Reply to Database application without BDE posted by Newb p15701 on
January 09, 2008
: There are several third party components (even free ones!) for Delphi database applications without the Borland Database Engine, not needing the BDE on the computer of the end-user.
: But alas, we can not install extra components in the free Turbo Delphi Explorer. Is there another solution for developing database apps without the 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 for free in the Delphi "personal" version Turbo Delphi Explorer. Before that time, it was only available in the Client/Server, Enterprise and some Professional versions of Delphi.
A ClientDataSet can access database files on servers as well as on your local computer. What types of the 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 Borland.
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.