Ignore:
Timestamp:
Mar 26, 2018, 11:37:46 PM (7 years ago)
Author:
chronos
Message:
  • Modified: Improved handling of SQL commands by XML backend.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormFields.pas

    r23 r24  
    108108    if FormField.ShowModal = mrOk then begin
    109109      FormField.Save(TField(ListView1.Selected.Data));
    110       Fields.Table.DbClient.Query('UPDATE ModelField SET TextBefore = ' + TField(ListView1.Selected.Data).TextBefore +
    111         ' WHERE Name = ' + TField(ListView1.Selected.Data).Name);
     110      Fields.Table.DbClient.Query('UPDATE ModelField SET Caption = ' + TField(ListView1.Selected.Data).TextBefore +
     111        ' , DataType = ' + TField(ListView1.Selected.Data).DataType.Name +
     112        ' WHERE Model = ' + Fields.Table.Name +' , Name = ' + TField(ListView1.Selected.Data).Name);
    112113      ReloadList;
    113114    end;
     
    123124begin
    124125  if Assigned(ListView1.Selected) then begin
    125     Fields.Table.DbClient.Query('DELETE FROM ModelField WHERE Name = ' + TField(ListView1.Selected.Data).Name);
     126    Fields.Table.DbClient.Query('DELETE FROM ModelField WHERE Model = ' + Fields.Table.Name +
     127      ' , Name = ' + TField(ListView1.Selected.Data).Name);
    126128    ReloadList;
    127129    UpdateInterface;
Note: See TracChangeset for help on using the changeset viewer.