This totally solved the problem.
//FormLoad/Show
SQLQuery1
....
...
SQLQuery2
...
...
SQLQuery3.DataBase := SQLite3Connection1;
SQLQuery3.DataSource := Datasource1;
SQLQuery3.Transaction := SQLTransaction1;
//Button Delete (didn't use deleteSQL [bug] maybe).
begin
SQLQuery3.SQL.Text := 'delete from LEADERS where LEADER_ALIAS_NAME = :LEADER_ALIAS_NAME';
SQLQuery3.ExecSQL;
SQLQuery1.Delete;
SQLQuery1.ApplyUpdates;
SQLTransaction1.CommitRetaining;
end;
//Button Update
begin
SQLQuery1.Edit;
SQLQuery1.Post;
SQLQuery1.ApplyUpdates;
SQLTransaction1.CommitRetaining;
end;
Ok, since I was the one who solved my own problem, can anyone add a button event for adding a new record.
sample;
when newButton was pressed then what event shall I code for SQLQuery1?
After inputting a few data, then press save, what shall I code also?
//Button NewSave
begin
if newsavebutton.caption='new' then
begin
?
end
else
begin
?
end;
end;
Thanks