Quantcast
Channel: MySQL Forums - Connector/NET and C#, Mono, .Net
Viewing all articles
Browse latest Browse all 1447

GetSchema (1 reply)

$
0
0
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.

Viewing all articles
Browse latest Browse all 1447

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>