It seems that once SqliteReturnString <> SQLITE_OK for a dataset, all
the TSQLite3Datasets in the app loose their synchs with the SQLite3
engine.
In case of conflict, for example when editing data in a dbGrid, if an
'unique' constraint causes SqliteReturnString <> SQLITE_OK :

* the DBGrid keep the edited line as if it was ok, and let you continue
adding other data lines
* if you continue working with -another- TSQLite3Dataset and tables
(same database), ApplyUpdates don't work anymore.

The solution I found is to close and re-open the first dataset (the one
which initiated the problem) just after testing SqliteReturnString.

(lazarus 0.9.14-1 and fpc-2.0.2-0)

oh, and SqliteReturnString need to be trimed when tested, his length
when := 'SQLITE_OK' is 19.


-- 
Thierry Andriamirado
http://thierry.andriamirado.free.fr


_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to