Ver Mensaje Individual
  #3  
Antiguo 28-03-2008
Avatar de Caral
[Caral] Caral is offline
Miembro Premium
 
Registrado: ago 2006
Posts: 7.659
Reputación: 25
Caral Va por buen camino
Hola
Antes de que me regañen:
Código Delphi [-]
procedure TForm1.Button1Click(Sender: TObject);
begin
adoquery1.Close;
adoquery1.SQL.Clear;
adoquery1.SQL.Add('Select carnet,nombres,apellido1,apellido2');
adoquery1.SQL.Add('from semma' );
adoquery1.SQL.Add('Where carnet =  :Carnet' );
adoquery1.Parameters[0].value:= Edit1.Text;
adoquery1.Open;
end;

procedure TForm1.Button2Click(Sender: TObject);

begin
adoquery2.Close;
adoquery2.SQL.Clear;
adoquery2.SQL.Add('insert into duplica(carnet,nombres,apellido1,apellido2)');
adoquery2.SQL.Add('values (:carnet, :nombres, :apellido1, :apellido2)');
adoquery2.Parameters[0].value:= adoquery1.Filebyname('carnet').Value;
adoquery2.Parameters[1].value:= adoquery1.Filebyname('nombres').Value;
adoquery2.Parameters[2].value:= adoquery1.Filebyname('apellido1').Value;
adoquery2.Parameters[3].value:= adoquery1.Filebyname('apellido2').Value;
adoquery2.ExecSQL;

end;

procedure TForm1.BitBtn1Click(Sender: TObject);
begin
form2.showmodal;
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
edit1.Clear;
edit1.SetFocus;
end;

end.
Saludos
Responder Con Cita