Board index » delphi » "Show Databases" of MySQL server

"Show Databases" of MySQL server

Hi there,

I know there are more out there who are facing this problem. I would like to
show the Databases on a MySQL server. I have tried to use a TSQLDataSet to
set CommandText to "Show databases" but I can't figure out how to retrieve
the results from the TSQLDataSet. Can someone tell me how to get the results
from the TSQLDataSet, or does someone know a different approach to show the
Databases on a MySQL server?

tnx Niels.

 

Re:"Show Databases" of MySQL server


Hi,

Download Mysql Front available off www.mysql.com site and you'll see how
they do. I myself just run a query
show databases and retreieve the information from the database field.

Query1.SQL.Clear;
Query1.SQL.Add('show databases');
Query1.Open;
DBList := TStringList.Create;
While not Query1.EOF do
 begin
DbList.Add(Query1.FieldbyName('database').AsString);
Query1.Next;
 end;

Thanks

Aaron.

Quote
"Sciron" <n.oude.nijh...@home.nl> wrote in message

news:iSHM8.75341$3g4.6702324@zwoll1.home.nl...
Quote
> Hi there,

> I know there are more out there who are facing this problem. I would like
to
> show the Databases on a MySQL server. I have tried to use a TSQLDataSet to
> set CommandText to "Show databases" but I can't figure out how to retrieve
> the results from the TSQLDataSet. Can someone tell me how to get the
results
> from the TSQLDataSet, or does someone know a different approach to show
the
> Databases on a MySQL server?

> tnx Niels.

Other Threads