How can I retrieve column descriptions from an access database in C#? -


i trying retrieve column descriptions ms access columns using c# (the text entered user in table designer describe purpose of column). how 1 go this? thought maybe extendedproperties in column hold when datatable through oledbconnection , loop through columns, extendedproperties has count of 0.

edit: thanks, remou, did trick. below quick test in c#

            catalog cat = new adox.catalogclass();             adodb.connection conn = new adodb.connection();             conn.open(_connectionstring, null, null, 0);             cat.activeconnection = conn;             adox.table mhs = cat.tables["mytablename"];             string test = mhs.columns["columnofinterest"].properties["description"].value.tostring(); 

using adox catalogue, can @ field property description, in vba:

catdb.activeconnection = "provider=microsoft.jet.oledb.4.0;" & _ "data source=" & currentproject.fullname  set tbl = catdb.tables("new")  set fld = tbl.columns("test") debug.print fld.properties("description") 

Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -