In our documentation, and in all our code source, we avoid using the VCL
DB.pas
related units, and all the associated RAD
components.
This is by design, since our experiment encouraged us to "think ORM, forget
anything about RAD (and even SQL in most cases)" in mORMot.
And it introduced some nice border-side effect to Delphi users, e.g. that even
a "Delphi Starter Edition" is able to use mORMot, have access to
SQLite3, MS SQL or Oracle or any other DB, add
interface-based RESTful
JSON services over it, just for free...
But in the real world, you may need to upgrade some existing application,
get rid of the BDE, or add a SOA layer over an existing business
intelligence.
And mORMot is able to serve you well in those scenarios.
That's why we just added a first attempt to expose SynDB
results
and mORMOt TSQLTableJSON
content into a
TDataSet
.
In order to avoid mixing the ORM and DB features with RAD units, we decided
to add two new units:
- SynDBVCL
unit to handle DB VCL dataset using
SynDB
data access.
This is for direct connection to the DB using our SynDB
classes.
May be handy.
- SQLite3VCL
unit to fill a DB VCL dataset using
TSQLTable/TSQLTableJSON
data access, as returned from our RESTful JSON server.
This first draft uses a TClientDataSet
in memory to set the
data.
Not perfect, but working. It was not meant for huge amount of data, so you have
an optional parameter to stop filling the TDataSet
when a
specified number of data rows is reached.
And, for performance reasons, you would better install the nice Midas speed
up patch by Andy, with Delphi older than Delphi 2009 Update 3.
Feedback is welcome
on our forum.