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.
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)
Best Regards
Boguslaw
Ok,I understand that because sqlite is purely SQL based it may be
difficult to allow Cancel to work properly but in fact without proper
Cancel method - it does not make sense to me creating full dataset
descendant for sqlite.
One solution would be duplicated buffer for previous posted value for
revering or simply (better) reget current row from database
I uploaded a version of sqlite3ds that retrieves the data from the
database when Cancel is called. The code is commented to avoid future
incompatibilities since the correct approach is to revert to the last
Posted value which demands more changes/testing. Anyway it's there to
you test and if this is what you want you can override the DoAfterCancel
procedure with that code, so there's no problem of futures
incompatibilities.
Luiz
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives