Bogusław Brandys escreveu:
But why Post is not working for TSqlite3Dataset ? ApplyUpdates seems
to be rather for remote server (Delphi help : "Changes made to the
client dataset’s local copy of data are not sent to the application
server until the client application calls the ApplyUpdates method for
the dataset.") , while sqlite is more desktop database I think.
This is by design, TSqliteDataset, and also sqldb, caches the data in
memory and works with them until the database is updated with
ApplyUpdates or custom Sql statements.This allows to send the changes to
database all together at same time. Sending the changes at each Post
would degrade the performance significantly. But you do it easily: just
add a OnAfterPost handler that calls ApplyUpdates.
Sqlite is the midterm of Desktop (TDbf) and full RDMS
(Mysql,Postgresql). It inherits characteristics of both, for good :-)
or for bad :-( .
Also I found a bug:
when I do TSqlite3Dataset.Cancel it doesn't revert value displayed in
DB controls connected to this dataset to previous state (to value
stored in database) This cause out of sync - value displayed is that
last modified by user while in database nothing was changed
(fortunately - if Dataset.Cancel would allow to post changes on Cancel
that will be more nasty bug)
Add a bugreport in fpc bugtracker.
In the mean time hook AfterCancel with RefetchData
Luiz
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives