Dim Cnstr As String
Dim dc As DataRow
Dim i As Integer
Dim j As Integer
Cnstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = C:\Program
Files\Microsoft Visual Studio\VB98\NWIND.MDB"
Dim Con As OleDb.OleDbConnection = New OleDb.OleDbConnection(Cnstr)
Con.Open()
Dim DBTables As DataTable =
Con.GetOleDbSchemaTable(System.Data.OleDb.OleDbSchemaGuid.Tables, New
Object() {Nothing, Nothing, Nothing, "TABLE"})
For i = 0 To DBTables.Columns.Count - 1
If DBTables.Columns(i).ToString = "TABLE_NAME" Then
For j = 0 To DBTables.Rows.Count - 1
dc = DBTables.Rows(j)
Console.Out.WriteLine(dc.Item(i))
Next
End If
Next i
Dim Da as OleDb.OleDbDataAdapter = New OleDb.OleDbDataAdapter("Select * From
Products", Con)
Dim Tbl As new DataTable
da.Fill(Tbl)
For i = 0 To Tbl.Columns.Count - 1
Console.Out.WriteLine(tbl.Columns(i).ToString())
Next