Changeset 24 for trunk/Forms


Ignore:
Timestamp:
Mar 26, 2018, 11:37:46 PM (7 years ago)
Author:
chronos
Message:
  • Modified: Improved handling of SQL commands by XML backend.
Location:
trunk/Forms
Files:
2 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;
  • trunk/Forms/UFormTables.pas

    r23 r24  
    131131    if FormTable.ShowModal = mrOk then begin
    132132      FormTable.Save(TTable(ListView1.Selected.Data));
    133       DbClient.Query('UPDATE Model SET Name = ' + TTable(ListView1.Selected.Data).Name);
     133      DbClient.Query('UPDATE Model SET Caption = ' + TTable(ListView1.Selected.Data).Caption + ' WHERE Name = ' + TTable(ListView1.Selected.Data).Name);
    134134      ReloadList;
    135135    end;
Note: See TracChangeset for help on using the changeset viewer.