Access Tables

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

Lespaul36

I am working on a program to convert access databases. I need to get a list
of the tables, fields, and field types.

I have tried this code, but didn't get anything other than a cound of how
many tables there are.

Function GetTables(ByVal conn As OleDbConnection) As DataTable
conn.Open()
Dim schemaTable As DataTable =
conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, _
New Object() {Nothing, Nothing, Nothing, "TABLE"})
conn.Close()

Return schemaTable
End Function

I also tried using the SQL:
SELECT Name FROM MSysObjects
WHERE Type=1 AND Flags=0

But I guess you need to change permission on the databases and I am not sure
how to do that programically. Also not all of the databases have the hidden
tables.

Any help would be great. thanks
 
LesPauls,

If it is permission in the tables inside access, than I would ask this in
the newsgroups

dotnet.framework.adonet or dotnet.general.

Or search for this in one of these newsgroups.

Paul Clement is forever answer this kind of questions however, although he
is active as well in this newsgroup is he it more in the two other ones
mentioned by me (and more).

http://groups.google.com/group/micr...s+password&qt_g=1&searchnow=Search+this+group

I hope this helps,

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top