Ignore:
Timestamp:
Jan 22, 2009, 9:20:15 AM (16 years ago)
Author:
george
Message:
  • Přidáno: Jednotka pro správu finančních dokladů.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/web/USqlDatabase.pas

    r134 r142  
    153153  I: Integer;
    154154  Value: string;
     155  DbRows: TDbRows;
    155156begin
    156157  Table := ATable;
     
    166167  System.Delete(DbNames, 1, 1);
    167168  System.Delete(DbValues, 1, 1);
    168   Query('INSERT INTO `' + Table + '` (' + DbNames + ') VALUES (' + DbValues + ')');
     169  DbRows := Query('INSERT INTO `' + Table + '` (' + DbNames + ') VALUES (' + DbValues + ')');
     170  DbRows.Free;
    169171end;
    170172
     
    219221  Value: string;
    220222  I: Integer;
     223  DbRows: TDbRows;
    221224begin
    222225  Table := ATable;
     
    232235  System.Delete(DbNames, 1, 1);
    233236  System.Delete(DbValues, 1, 1);
    234   Query('REPLACE INTO `' + Table + '` (' + DbNames + ') VALUES (' + DbValues + ')');
     237  DbRows := Query('REPLACE INTO `' + Table + '` (' + DbNames + ') VALUES (' + DbValues + ')');
     238  DbRows.Free;
    235239end;
    236240
     
    246250  Value: string;
    247251  I: Integer;
     252  DbRows: TDbRows;
    248253begin
    249254  Table := ATable;
     
    256261  end;
    257262  System.Delete(DbValues, 1, 1);
    258   Query('UPDATE `' + Table + '` SET (' + DbValues + ') WHERE ' + Condition);
     263  DbRows := Query('UPDATE `' + Table + '` SET (' + DbValues + ') WHERE ' + Condition);
     264  DBRows.Free;
    259265end;
    260266
     
    302308
    303309procedure TSqlDatabase.Delete(ATable: string; Condition: string = '1');
     310var
     311  DbRows: TDbRows;
    304312begin
    305313  Table := ATable;
    306   Query('DELETE FROM `' + Table + '` WHERE ' + Condition);
     314  DbRows := Query('DELETE FROM `' + Table + '` WHERE ' + Condition);
     315  DbRows.Free;
    307316end;
    308317
Note: See TracChangeset for help on using the changeset viewer.