/*
   database informations with Access
   taken from Example04.cs
*/
private void ShowDatabaseInfo(string filePath)
{
   // start access 
   Access.Application accessApplication = new Access.Application();

   // open database
   DAO.Database database = 
accessApplication.DBEngine.Workspaces[0].OpenDatabase(filePath); TreeNode tnTableDefs = treeViewInfo.Nodes.Add("Tables"); foreach (DAO.TableDef item in database.TableDefs) tnTableDefs.Nodes.Add(item.Name); TreeNode tnQueryDefs = treeViewInfo.Nodes.Add("Queries"); foreach (DAO.QueryDef item in database.QueryDefs) tnQueryDefs.Nodes.Add(item.Name); TreeNode tnRelations = treeViewInfo.Nodes.Add("Relations"); foreach (DAO.Relation item in database.Relations) tnRelations.Nodes.Add(item.Name); TreeNode tnContainers = treeViewInfo.Nodes.Add("Containers"); foreach (DAO.Container item in database.Containers) tnContainers.Nodes.Add(item.Name); }

Last edited Jun 13, 2012 at 1:44 PM by SebastianDotNet, version 3