0

Possible Duplicates:
Retrieve List of Tables in MS Access File
How can I get a list of tables in an Access (Jet) database?
Finding Tables in MS Access using C#
What is the OleDb equivalent for INFORMATION_SCHEMA

Is there a way to obtain the list of all tables in an.mdb file along with their associated row counts?

Community
  • 1
  • 1

1 Answers1

0

Use this :

con.Open();
DataTable dt = con.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, new object[] {null, null, null, "TABLE"});

for (int i=0;i< dt.Rows.Count;i++)
{
MessageBox.Show( dt.Rows[i]["TABLE_NAME"].ToString());
}
con.Close();
Duke
  • 1,731
  • 2
  • 17
  • 33