Einzelnen Beitrag anzeigen

Angel4585

Registriert seit: 4. Okt 2005
Ort: i.d.N.v. Freiburg im Breisgau
2.199 Beiträge
 
Delphi 2010 Professional
 
#3

AW: Find all the records in the table and change the text

  Alt 25. Jan 2013, 10:20
Delphi-Quellcode:
var
  Options: TLocateOptions;
begin
  Options := Options + [loPartialKey, loCaseInsensitive];
  Table1.Close;
  Table1.Open;
  Table1.First;
  while Table1.Locate('Permission',Edit1.Text,Options) do
  begin
    Table1.Edit;
    Table1.FieldByName('Permission').AsString := Edit2.Text;
    Table1.Post;
  end;

  ShowMessage('Permissions have been changed..');
Didn't test it but should work.
Though the better version ist the one from DeddyH using SQL.
Martin Weber
Ich bin ein Rüsselmops
  Mit Zitat antworten Zitat