Page 1 of 1

Check Table output

Posted: Wed 20 Jul 2011 23:17
by 777Yves
Hi,

I use a tQuery to send the following command to the server and I don't see how I could send the result to a tMemo for displaying on the screen.
I have also check your other query like component but did not find a solution.

Code: Select all

  while not MyMetaData.Eof do
  begin
    MyQuery1.SQL.Clear;
    MyQuery1.SQL.Add('Check table ' + MyMetaData.FieldByName('TABLE_NAME').AsString));
    MyQuery1.Execute;

    MyMetaData.Next;
  end;
Many thanks.

Yves

Posted: Thu 21 Jul 2011 09:38
by AndreyZ
Hello,

You can use the following code:

Code: Select all

MyQuery1.SQL.Text := 'Check table ' + MyMetaData.FieldByName('TABLE_NAME').AsString);
MyQuery1.Open;
Memo1.Lines.Add('Msg_Type: ' + MyQuery1.FieldByName('Msg_Type').AsString + '; Msg_Text: ' + MyQuery1.FieldByName('Msg_Text').AsString);

Check Table output

Posted: Thu 21 Jul 2011 19:38
by 777Yves
Thanks, it is working fine.