Hello,
Please read[
^] this article. Below is an excrept from the same article.
Sub Main()
Dim connectionString As String = "PUT YOUR CONNECTION STRING HERE"
Using connection As New SqlConnection(connectionString)
connection.Open()
Dim table As DataTable = connection.GetSchema("Tables")
// Each row represents a single table
// For SQL Server each row will have four columns namely table_catalog, table_schema, table_name and table_type
For Each row As DataRow In table.Rows
For Each col As DataColumn In table.Columns
Console.WriteLine("{0} = {1}", col.ColumnName, row(col))
Next
Next
End Using
End Sub
Regards,