Please can any one tell how to retirve all table names from mdb file if we just know source file name.
I can do it only in sql server there is a query type looks as(INFORMATION_SCEMA_TABLES) but i need the same rersult with MS Acces file (mdb).
_____________________________
Thanks In Advance.
Getting tables_names from mdb file.
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

heavymetalman756728 reputationPosted Jun 9, 2006, 8:56 AM EDT
This will give you a DataTable with the table names in it.public DataTables GetTableNames(OleDbConnection conn)
{
try
{
conn.Open();
DataTable schemaTable = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, new object[] { null, null, null, "TABLE" } );
conn.Close();
return schemaTable;
}
catch(Exception ex)
{
// Whatever you do when a problem occurs
return new DataTable(); //empty
}