#1 2016-03-21 14:11:39

corchi72
Member
Registered: 2010-12-10
Posts: 232

TSQLTable.DeleteRow()

Hi, after performing a TSQLTable.DeleteRow(), what should I do to remuve the recorcord from the table for ever?


Thanks corchi

Offline

#2 2016-03-21 14:13:08

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,655
Website

Re: TSQLTable.DeleteRow()

What do you mean by "forever"?

Offline

#3 2016-03-21 14:18:49

corchi72
Member
Registered: 2010-12-10
Posts: 232

Re: TSQLTable.DeleteRow()

from the server

Offline

#4 2016-03-21 15:42:58

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,655
Website

Re: TSQLTable.DeleteRow()

There is no such dual-way feature in TSQLTable yet.

So you have to call the Delete() ORM method in synch with the TSQLTable.DeleteRow() call.

Offline

#5 2016-03-21 15:57:38

corchi72
Member
Registered: 2010-12-10
Posts: 232

Re: TSQLTable.DeleteRow()

so I have to delete a list of records should write this:

try



  if (fLsDelete.Count > 0) then
  begin
    fClient.BatchStart(fRecordClass);
    for ID in fLsDelete do
    begin
      fClient.BatchDelete(ID);
      fTable.DeleteRow(fTable.RowFromID(ID));
      fSQLRest.Delete("TSQLRecordClass", ID)
    end;
    fClient.BatchSend(Results);
 
 //and not necessary, but without properly to create the list of records of fTable:

   fClient.UpdateFromServer([fTable], Refreshed);


  end;

  finally
      fLsDelete.Clear;
  end;

Offline

Board footer

Powered by FluxBB