VB.net Get a list of tables from a MySQL database

Murray Brown
Murray Brown used Ask the Experts™
on
Server=173.194.240.189;Database=testdb;User Id=root;Password=xxxx

What  VB.net code would I use to get a list of tables from a MySQL database
using a connection string like that above
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
This is what you need.

Set the connection string with database name in "conn" Connection variable.

command.Connection = conn
command.CommandText = "SHOW TABLES"

adapter.SelectCommand = command
reader = command.ExecuteReader
Murray BrownASP.net/VSTO Developer

Author

Commented:
Thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial