procedure TForm1.List_DllbxMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
DbUpdate;
end;
procedure TForm1.DbUpdate();
var
SQLQuery: TSQLQuery; // Veritabanı
begin
if (Main_Conn.Connected = false) then // Bağlantı kapalıysa aç
begin
Main_Conn.Open;
end;
Main_Tscn.Active:=True;
Main_Qry.Active:=False;
SQLQuery := TSQLQuery.Create(nil);
SQLQuery.Database := Main_Conn;
SQLQuery.Transaction := Main_Tscn;
SQLQuery.Close;
SQLQuery.Clear;
SQLQuery.SQL.Add('INSERT OR REPLACE INTO "tbl_list" ( ');
SQLQuery.SQL.Add(' id, txt_option, txt_placeholder, int_data_type_id, txt_value, txt_default_value, bln_use_default, txt_operator, txt_additional_options, txt_description) ');
SQLQuery.SQL.Add('SELECT L.id, L.txt_option, L.txt_placeholder, D.id, :VALUE, L.txt_default_value, :USE_DEFAULT, L.txt_operator, L.txt_additional_options, L.txt_description ');
SQLQuery.SQL.Add('FROM "tbl_list" L ');
SQLQuery.SQL.Add('LEFT JOIN "tbl_data_type" D ');
SQLQuery.SQL.Add(' ON D.id = L.int_data_type_id ');
SQLQuery.SQL.Add('WHERE L.id = :ID ');
SQLQuery.Params.ParamByName('ID').AsInteger:=1;
SQLQuery.Params.ParamByName('VALUE').AsString:=Value_Edt.Text;
SQLQuery.Active:=True;
SQLQuery.Open;
SQLQuery.ApplyUpdates();
Main_Tscn.CommitRetaining;
Main_Qry.Active:=True;
end;