var
dato: Integer;
tipo: String;
begin
Dato:= ADOQuery1.FieldByName('id_asistencia').asinteger;
If Dato = 1 then
tipo:= 'Presente';
If Dato = 2 then
tipo:= 'Tarde';
If Dato = 3 then
tipo:= 'Ausente';
AdoQuery2.SQL.Text := 'Update ASISTENCIAS set id_asistencia = '+IntToStr(Dato)+', x_asistencia = '+QuotedStr(Tipo);
AdoQuery2.ExecSQL;
ADOQuery1.Close,
ADOQuery1.open;