Delphi FireDAC 获取MySQL 数据库databases 列表


procedure TfrmMain.sBitBtn1Click(Sender: TObject);
var
k: integer;
begin

   FDQuery1.SQL.Clear;
   FDQuery1.SQL.Text := 'SHOW DATABASES';
   FDQuery1.Open;
   DataSource1.DataSet:=FDQuery1;

while NOT FDQuery1.EOF do
    Begin
      ShowMessage(FDQuery1.FieldByName('database').AsString);
      sComboBox1.items.add(FDQuery1.FieldByName('database').AsString);
      FDQuery1.Next;
    End;
end;

联系电话:
020-00000000
联系电话:
020-00000000
联系电话:
020-12345678