开发者

How to get the list of Views from MS Access

The following is the code to get list of tables from MS Access.

                   List<string> tables = new List<string>();
                    foreach (DataRow schemaRow in datatable.Rows)
                      {
                    string sheet = schemaRow["TAB开发者_高级运维LE_NAME"].ToString();
                    String[] excelSheets = new String[datatable.Rows.Count];
                    if (schemaRow["TABLE_TYPE"].ToString() == "TABLE")
                    tables.Add(sheet);
                   }

I need the list of Views and columns of the query from MS Access database.


Check this out for a starting point, it retrieves tables:

http://davidhayden.com/blog/dave/archive/2006/10/01/GetListOfTablesInMicrosoftAccessUsingGetSchema.aspx

..and uses this API: http://davidhayden.com/blog/dave/archive/2006/01/15/2734.aspx

You can use the same API for views.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜