AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Datenbanken Delphi Find all the records in the table and change the text
Thema durchsuchen
Ansicht
Themen-Optionen

Find all the records in the table and change the text

Ein Thema von danten · begonnen am 25. Jan 2013 · letzter Beitrag vom 25. Jan 2013
 
danten

Registriert seit: 19. Feb 2012
Ort: Czech Republic, Prag
126 Beiträge
 
Delphi 10.1 Berlin Architect
 
#1

Find all the records in the table and change the text

  Alt 25. Jan 2013, 10:10
Datenbank: Absolute Database • Version: 4 • Zugriff über: Absolute Database
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.
Angehängte Grafiken
Dateityp: png Rename.png (4,6 KB, 5x aufgerufen)
Daniel
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 01:43 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz