Error in the Insert/Post methods for SQLite 3? lazarus / 16-Databases ---------------------------------------------------------------------- nightrider · 2011-09-25 22:34 I ran the simple code showed below and nothing happens with the table "tblpar" in the database associated with SQLite3Dataset named "cdsTeste". If I transform the code from cdsTeste.Insert thru ShowMessage in comments and remove the comment in the cdsTeste.ExecuteDirect, the database is updated successfully and a new row appears in it. Can someone of you explain what's happen here, please? I'm using Lazarus 0.9.30 with SQLite 3 in windows 7. But I pretend to execute the application in windows mobile as soon as I solve this problem. Code mentioned above: procedure TForm1.Button1Click(Sender: TObject); begin   cdsTeste.SQL := 'select * from tblpar where cdemp = -69';   try     cdsTeste.Open;   except     On e:Exception do        begin;          ShowMessage('Erro open = '+  e.Message);          Halt;        end;   end;   if cdsTeste.RecordCount > 0  then      begin;        ShowMessage('Record count inesperado = ' + IntToStr(cdsTeste.RecordCount));        Halt;      end;   cdsTeste.Insert;   cdsTeste.FieldByName('cdemp').AsInteger := 6969;   cdsTeste.FieldByName('dsnomecom').AsString := 'fhasjfhsjfhksfhsjkfsdjkfns dfa';   cdsTeste.FieldByname('dspath').Clear;   cdsTeste.Post;   ShowMessage(BoolToStr(cdsTeste.ApplyUpdates)); //  cdsTeste.ExecuteDirect('insert into tblpar(cdemp,dsnomecom,dspath) values(6969,''fhasjfhsjfhksfhsjkfsdjkfns dfa'',null)'); end;  Greetings from Sao Paulo - Brasil Ricardo ---------------------------------------------------------------------- Lacak2 · 2011-09-26 05:58 May be, that problem is in "After applying the updates, a commit must be executed to save the changes on the database server." See: http://wiki.lazarus.freepascal.org/SqlDBHowto#How_to_change_data_ in_a_table.3F ---------------------------------------------------------------------- nightrider · 2011-09-26 12:08 It seems that the behavior of TSQLite3DataSet isn't similar of that of TSQLQuery and some properties and methods of TSQLQuery doesn't exist in TSQLite3Dataset. For example the property Upda]"]>Blockedde isn't recognized by TSQLite3Dataset objects. Cheers Ricardo