问题
I'm looking for a solution to provide MDB database viewing capabilities in my WinForms application. The goal is to allow user browsing tables, columns and rows. Any open-source or freeware widget available for this?
回答1:
I think you don't need a special widget for this.
You can do it quite easily yourself, only with built-in .net stuff and a bit of Access knowledge.
1) Browsing tables (=getting a list of all existing tables):
Every MDB (at least A2000 and A2003, I have never used A2007 and above) has a hidden table named MSysObjects
.
It contains ALL objects (forms and reports as well, for example) but you can filter on the Type
column to get only the tables:
Type = 1 : local tables
Type = 6 : linked tables
2) Showing the content of one table:
Just load it into a DataSet and display it in a grid.
来源:https://stackoverflow.com/questions/5896989/net-tool-for-browsing-mdb-database