#1 Re: mORMot 1 » Newbie question: SQLite3 standalone? startup sample code... » 2013-01-23 13:00:20

ab wrote:

You can use SynSQlite3.pas, or even better, SynDBSQLite3.pas unit.

The SynDBSQLite3.pas unit works with our SynDB classes, so you will be able to switch to another database engine, via OleDB, ODBC or direct connection, just by changing the class type.

All those units are not tied to the ORM part of the framework, which is in SQlite3\mORMot.pas.

It is preferred to use latest unstable version (1.18) instead of the mORMot.7z archive.

But be aware that our DB classes are not compatible with DB.pas, so won't work directly with VCL DB components.
Or you have to use http://blog.synopse.info/post/2012/06/2 … t-or-SynDB

But those classes are also faster than the one provided by DB.pas and relatives.
smile

Thanks for the quick reply, ab.  I'll fiddle and try to create a db file containing some data.

#2 mORMot 1 » Newbie question: SQLite3 standalone? startup sample code... » 2013-01-23 12:06:07

superdiy
Replies: 2

Hi everybody,

I want to use this to create and save quite simple SQLite3 database files to use these db files as input files for another application.  I'm very happy using standard SQL syntax (instead of ORM) to populate the tables and does not really need anything fancy or extremely fast - I just need the db file!  I do not want to use a dll with my application and after searching the web I came accross this framework which includes everything inside your main exe.  From what I have read in the product description the SQLite functionality can be used without the framework, but I cannot find documentation or samples of how to achieve this.  I've also searched the forum, but without any luck.

I've downloaded the framework files and added it to my Delphi 2010 installation as per the readme.txt file. Then I downloaded the "Synopse mORMot Framework SAD 1.17.pdf" file and went through it up to page 180.  On page 180 is the first reference to a filename: "TSQLRestServerDB.Create(aModel,ChangeFileExt(paramstr(0),'.db'),true)", but I don't know if this "server" example is what I need.  I tried doing more searches in the pdf for filenames etc., but only found these "client" and "server" examples.  Can someone confirm if it would indeed be possible to use (some of) this framework to create these simple SQLite3 type database files and possibly give some example code and units which I would require to achieve this.

Thanks in advance!

Board footer

Powered by FluxBB