If you are making an application where you need to deal with a database, the following piece of code can help you in getting a list of available tables in the database.
void table()
{
string path = @"D:\....... your database file path";
listBox1.Items.Clear();
textBox1.Text = "";
mycon = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + path + ";Persist Security Info=True");
mycon.Open();
DataTable tables = mycon.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, new object[] { null, null, null, "TABLE" });
foreach (DataRow row in tables.Rows)
listBox1.Items.Add(row[2]);
mycon.Close();
mycon.Dispose();
}
Although there are many other methods, I have kept it simple for beginners.
Welcome to suggestions.