Getting table names from .mdb file
-
Hi, I tried the c# forum, but this might be better. How do I programatically get table names from a .mdb file? There doesn't seem to be a way. I'd like to be able to open any .mdb file, read in the list of tables, etc. Thanks for any help or tips. Brian.
-
Hi, I tried the c# forum, but this might be better. How do I programatically get table names from a .mdb file? There doesn't seem to be a way. I'd like to be able to open any .mdb file, read in the list of tables, etc. Thanks for any help or tips. Brian.
There are a couple of ways to do it.... One way is to use ADODB.Connection.OpenSchema method - returns a recordset with table names and characteristics if specifying the adSchemaTables flag Other way is to use ADOX - Create a Catalog object, give it an ActiveConnection and it exposes a Tables collection - useful for seeing what's there and also modifying schema info... As for doing it in .NET - no idea! SUspect that ADO.NET will support the above, but worth checking lol "Now I guess I'll sit back and watch people misinterpret what I just said......" Christian Graus At The Soapbox