Access Tables

  • Thread starter Thread starter Lespaul36
  • Start date Start date
L

Lespaul36

I am working on a program that will convert access databases .I need to get
each table, field, and field type, but I can't seem to get a list of he
table names.

I have tried this code, but haven't gotten anything.
Function GetTables(ByVal conn As OleDbConnection) As DataTableconn.Open()

Dim schemaTable As DataTable =
conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, _

New Object() {Nothing, Nothing, Nothing, "TABLE"})

conn.Close()

Return schemaTable

End Function
 
¤ I am working on a program that will convert access databases .I need to get
¤ each table, field, and field type, but I can't seem to get a list of he
¤ table names.
¤
¤ I have tried this code, but haven't gotten anything.
¤ Function GetTables(ByVal conn As OleDbConnection) As DataTableconn.Open()
¤
¤ Dim schemaTable As DataTable =
¤ conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, _
¤
¤ New Object() {Nothing, Nothing, Nothing, "TABLE"})
¤
¤ conn.Close()
¤
¤ Return schemaTable
¤
¤ End Function
¤

You should be able to find one or more examples here:

http://tinyurl.com/9ss4e


Paul
~~~~
Microsoft MVP (Visual Basic)
 
Back
Top