Use TDataSet in mORMot or SynDB
In our documentation, and in all our code source, we avoid using the VCL
DB.pas related units, and all the associated RAD
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
And mORMot is able to serve you well in those scenarios.
That's why we just added a first attempt to expose
TSQLTableJSON content into a
In order to avoid mixing the ORM and DB features with RAD units, we decided to add two new units:
unit to handle DB VCL dataset using
This is for direct connection to the DB using our
SynDBclasses. May be handy.
unit to fill a DB VCL dataset using
TSQLTable/TSQLTableJSONdata access, as returned from our RESTful JSON server.
This first draft uses a
TClientDataSet in memory to set the
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.