I have an MS Access 2002-2003 database. I’d like to know if there’s a way to programmatically retrieve the column descriptions. I can already obtain the column type, name, etc. using
OleDbDataReader reader = cmd.ExecuteReader(CommandBehavior.KeyInfo);
DataTable schemaTable = reader.GetSchemaTable();
foreach (DataRow myField in schemaTable.Rows)
{
foreach (DataColumn myProperty in schemaTable.Columns)
{
// etc...
}
}
but I don’t have access to the “Description” information (which you can view when using “Design View” in MSAccess).
Is there a simple way to get the “Description” information?
Here’s what I ended up doing:
This works great, except I had some trouble finding the right assemblies to add as references. I had to add a reference to adodb.dll (which comes with .Net). I also had to add a reference to Microsoft ADO Ext. 2.8 for DDL and Security which is an ActiveX component (found in the COM tab when adding references in Visual Studio).
Code snippets are great, but if you omit reference information, some people get stuck 😉