Hi everyone.
Please help with the code.
I need to retrieve all records entered in Edit1 and rewrite them according Edit2.
I use this code, but it overwrites all raises my records in the table.
Edit1.Text = Old string
Edit2.Text = New string
Delphi-Quellcode:
var
Options: TLocateOptions;
begin
Options := Options + [loPartialKey, loCaseInsensitive];
Table1.Close;
Table1.Open;
Table1.Locate('Permission',Edit1.Text,Options);
Table1.First;
while not Table1.eof do
begin
loginForm.ABSTable1.Edit;
loginForm.ABSTable1.FieldByName('Permission').AsString := Edit2.Text;
loginForm.ABSTable1.Post;
loginForm.ABSTable1.next;
loginForm.ABSTable1.Locate('Permission',Edit1.Text,Options);
end;
ShowMessage('Permissions have been changed..');
Thank you all.