Home All Groups Group Topic Archive Search About
Author
6 Jan 2006 5:57 AM
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

Author
6 Jan 2006 8:40 AM
Cor Ligthert [MVP]
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/microsoft.public.dotnet.general/search?group=microsoft.public.dotnet.general&q=paul+access+password&qt_g=1&searchnow=Search+this+group

I hope this helps,

Cor