You are not logged in.
Pages: 1
Hi!
I am at a basic course in Delphi programming, learning SQL and such, so excuse my newbie question
I want to use SQLite3 integration in Synopse for doing some easy work at class, as other Sqlite3 libraries i've read are not so complete.
The plan is to build a initial delphi program to create a table, fill in some records, and then browse them in a form, or even in the console.
Then improving this little example to add more tables or other db functions.
So first all i want is create a DB in sqlite3, create a table, insert some records and then iterate then and print them.
The problem is i don't need all the (at my level, understand me) very complicated functions of Synopse, i don't need client/servers or rest or json,
no caching, no external db, no encryption... just only create and open and little sqlite3 file locally.
I've read documentation, specially chapter 8, read the forums and search in the web, also looked the examples in the sqlite3 folder, but all use complex access
methods (restclient, external dbs, etc...)
Could anyone drop me a hand, i am starting with this stuff.
I want to use static (obj compiled) so i guess i need SyncSQLite3Static? but then?... i am lost
i need:
- basic local sqlite3 opening and create a table
something like this exists? :
var db:TSQL3DB;
result:=db.create(filename,access_modes,....)
result:=db.sqlexecute('create table...');
- basic sql select records
- then iterate
- finally closing
Is this possible without using complex code? just basic units? I know it is possible
thanks!!
Excuse my English!
Offline
You are right: you can use the SynSQLite3.pas unit directly, without mORMot.pas.
To have the static SQLite3 engine linked, ensure SynSQLite3Static.pas is in one of your uses clause.
You have some sample code in SynSelfTests.pas, in procedure TTestSQLite3Engine.DatabaseDirectAccess.
(from our regression tests)
Enjoy!
Offline
Pages: 1