I have an Access 97 database that I am trying to get the data schema and the data out of. I don't know how many tables there are, or what they're called, nor what column names there are.
I have no problem getting into the database programmatically, but how do you discover the schema?
I'm using this to get the schema table:
static DataTable GetSchemaTable(string connectionString)
{
using (OleDbConnection connection = new OleDbConnection(connectionString))
{
connection.Open();
DataTable schemaTable =
connection.GetOleDbSchemaTable(OleDbSchemaGuid.Tables,
new object[] { null, null, null, "TABLE" });
return schemaTable;
}
}