Hello,
I'm writing an embedded application that will need a small database (no
more than a couple thousand records), and I though sqlite could do it.
It probably won't have any graphical interface, so I don't need all the
goodies of a TDataset descendant, OTOH I like some other things a
dataset will buy me.
Needless to say, the application must be rock solid, running unattended
24/7.
I made a quick test with the sqlite3ds component that's included in
lazarus and with SQLitePass http://source.online.free.fr/
I dropped either dataset in a form with a datasource and a dbgrid (as
suggested in the wiki).
My first impression (and as every first impression may just be wrong) is
tha sqlite3ds doesn't work well with a dbgrid, because it doesn't
automatically update the underlying database and so it doesn't catches
exceptions when you, e.g, try to insert a duplicate. What's worse, when
I call ApplyUpdates it silently discards the data (I would have expected
at least an exception, but I see that there's no exception raised and
neither an event is called in case of errors in
TCustomSqliteDataset.ApplyUpdates).
SQLitePass seems more solid (again, only with this simple test), since
it automatically updates the database and raises an exception
immediately if I try to insert a duplicate key. OTOH it raises a
RunError(204) when I close the form.
Pros of sqlite3ds:
- included in lazarus
- author active on this mailing list
- ...?
Cons of sqlite3ds:
- incomplete (?) implementation
- doesn't really check errors
- ...?
Pros of SQLitePass:
- it seems to be a more thorough implementation of a dataset
- ...?
Cons of SQLitePass:
- RunError(204)
- 3rd party component (though it seems to be closely tracking lazarus
development)
- ...?
Any other opinion/option/suggestion (Zeoslib? a simpler wrapper around
sqlite library?)
Note that I discarded firebird embedded since I read I cannot open the
same database in more than one program
(http://www.sqlite.org/cvstrac/wiki?p=SqliteVersusFirebird, section
"Concurrency").
Bye
--
Luca Olivetti
Wetron Automatización S.A. http://www.wetron.es/
Tel. +34 93 5883004 Fax +34 93 5883007
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives