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

Murray Brown
Murray Brown used Ask the Experts™
Server=;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
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
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



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