Follow the code:
status := DataModule1.ZQuery2.FieldByName('Msg_text').AsString;
while not DataModule1.ZQuery1.Eof do
begin
if status <> 'OK' then
begin
DataModule1.ZQuery3.Close;
DataModule1.ZQuery3.SQL.Clear;
DataModule1.ZQuery3.SQL.Add('Repair tables ' + Parametro);
DataModule1.ZQuery3.Open;
ShowMessage(DataModule1.ZQuery3.Sql.Text);
end
else
begin
DataModule1.ZQuery1.Next;
end;
end;
With the help of Filipe.Fonseca, I was able to check the items below.
Check in the tables that appear in my first DBGrid
I just want it to work if Msg_Text
is not OK, it does Repair
.
Could someone help me?