List of available databases (myConnection as configuration tool)

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
[email protected]
Posts: 7
Joined: Sat 06 Jan 2018 15:37

List of available databases (myConnection as configuration tool)

Post by [email protected] » Wed 19 Dec 2018 16:29

hi

Within my application i use a encrypt configuration file. This configuration file contains :
- server/ip
- port
- username
- password
- database

yes..it looks like myConnection. The user who is on site fills the configuration file
using a simple delphi form. Now i would like to retrieve all available databases
for this server for this username within a combobox. Just like myConnection does.

I have all the nessacary info(see above) but how can i retrieve all
available database in a combobox or is there a better way in combination
with myConnection?


Regards Peter

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: List of available databases (myConnection as configuration tool)

Post by ViktorV » Thu 20 Dec 2018 09:48

To solve your task, you can use the following code:

Code: Select all

  MyConnection.Connected := True;
  MyConnection.GetDatabaseNames(Memo.Lines);

Post Reply