Does anyone have an example, using VB.NET, of walking through a connection and getting a list of the table names?
This DOES NOT work:
***************************************
'Connect to the database
Dim cnStr As String = "server=localhost;user=myself;database=test;password=whatever"
Dim MyConn As MySqlConnection = New MySqlConnection(cnStr)
MyConn.Open()
Dim tableData As DataTable = cnRead.GetSchema
For Each row In tableData.Rows
MsgBox(tableData.TableName)
Next
*****************************************
All I get from the message box is "MetaDataCollections" for each element.
This DOES NOT work:
***************************************
'Connect to the database
Dim cnStr As String = "server=localhost;user=myself;database=test;password=whatever"
Dim MyConn As MySqlConnection = New MySqlConnection(cnStr)
MyConn.Open()
Dim tableData As DataTable = cnRead.GetSchema
For Each row In tableData.Rows
MsgBox(tableData.TableName)
Next
*****************************************
All I get from the message box is "MetaDataCollections" for each element.