Check Table output

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
777Yves
Posts: 37
Joined: Mon 09 Aug 2010 19:55
Location: Québec

Check Table output

Post by 777Yves » Wed 20 Jul 2011 23:17

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

AndreyZ

Post by AndreyZ » Thu 21 Jul 2011 09:38

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);

777Yves
Posts: 37
Joined: Mon 09 Aug 2010 19:55
Location: Québec

Check Table output

Post by 777Yves » Thu 21 Jul 2011 19:38

Thanks, it is working fine.

Post Reply