SQLite - update sql - error lazarus / 16-Databases ---------------------------------------------------------------------- René Baran · 2011-01-31 21:03 Hi everybody. I did probe to use SQLite DB in Lazarus. I'm able to insert, delete, select records, but when I would like to update record, than it writes me error "Operation cannot be performed on a active dataset."  Error dialog: http://files_to_forums.remontsw.eu/sqlite_lazarus_error.jpg Can you help me, please, where is the error? Here is the problematic sequence: http://files_to_forums.remontsw.eu/sqlite_lazarus_source.txt Problem is in the condition block: else If TypZaz = 1 Then Begin    Form5.SQLQuery1.Params.ParamValues['Firma'] := Form6.Edit1.Text;    Form5.SQLQuery1.UpdateRecord; end; Thank you for all help. Rene ---------------------------------------------------------------------- abmservice · 2011-01-31 21:10 Datamodule1.SQLQuery8.SQL.Add('update dokumenty set id_dok_finansowego=:iddok where id_dokumenty=:id_dokumenty');          Datamodule1.SQLQuery8.Params.ParamByName('iddok').AsInteger:=id_dok;          Datamodule1.SQLQuery8.Params.ParamByName('id_dokumenty').AsIn teger:=nrdm;          Datamodule1.SQLQuery8.ExecSQL;                                            See if it now will be ok? This is an example - so I draw a conclusion. ---------------------------------------------------------------------- Kyjan · 2011-01-31 21:12 Hi, i suggest to use tsqlite3dataset, it is more simple than using the sql commands. And you can update the database with the simpe Code: [Select]Post;Applyupdates; or, in your code Code: [Select]Form5.SQLQuery1.Edit This will put the Query in Edit state, and it will update your records. commands. The tsqlite3dataset can be found here: http://sqlite4fpc.yolasite.com/ Regards, Kyjan