unit UCargarCurp;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.Buttons, Data.DB,
  Data.Win.ADODB;

type
  TFCargarCurp = class(TForm)
    Memo1: TMemo;
    BitBtn1: TBitBtn;
    BitBtn2: TBitBtn;
    DSCurps: TDataSource;
    QCurps: TADOQuery;
    Memo2: TMemo;
    procedure BitBtn1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FCargarCurp: TFCargarCurp;

implementation

{$R *.dfm}

procedure TFCargarCurp.BitBtn1Click(Sender: TObject);
var
 i: integer;
 linea: string;
begin
 i:=1;
 showmessage(inttostr(memo1.Lines.Count));
 while i >= memo1.Lines.Count do
  begin
    linea:= memo1.Lines[i];
    memo2.Lines.Add('Update Empleados set Elegido = 1 where CURP = '+linea);
    inc(i);
  end;
  showmessage('listo!!');
end;

end.
