ACC1x: Programming with the Object Analyzer Engine and Utilities

ID: Q88620


The information in this article applies to:


SUMMARY

When the Database Analyzer library is loaded into memory, you not only have access to the Database Analyzer tool, but also to all the core commands that do the actual analysis. This article discusses these core commands, and describes how you can use them to include data analysis in your custom application or to create your own database-object analysis tool.

This article assumes that you are familiar with Access Basic and with creating Microsoft Access applications using the programming tools provided with Microsoft Access. For more information about Access Basic, please refer to the "Introduction to Programming" manual.


MORE INFORMATION

The Database Analyzer tool is included with Microsoft Access. You can use this tool to retrieve information about the design of objects (such as tables, queries, and forms) in your database. For more information about the Database Analyzer tool, including instructions about how to install the Database Analyzer, see the following file that is shipped with Microsoft Access and is located in your ACCESS directory:


   Microsoft Access version 1.0: PSSKB.TXT (Question 23)
   Microsoft Access version 1.1: ANALYZER.TXT 


After you have loaded the Database Analyzer library into memory (by following the instructions in the file named above), you not only have access to the Database Analyzer tool, but also to all the core commands that do the actual analysis.

The Database Analyzer consists of three pieces:
Once you have specified an object to be analyzed, the Database Analyzer calls the Object Analyzer, which performs the analysis using one of the following core commands:


   DumpTableInfo
   DumpQueryInfo
   DumpFormOrReport
   DumpMacroInfo
   DumpModuleInfo 


Assuming you have loaded the Database Analyzer library into memory, these commands are available to you in the Immediate window. To try one of these commands, do the following:
  1. Open the sample database NWIND.MDB.


  2. Open the Introduction To Programming module.


  3. From the View menu, choose Immediate Window.


  4. Type the following line in the Immediate window, and then press ENTER:

    DumpTableInfo "NWIND.MDB", "MyTableInfo", "Employees", False


A new table called MyTableInfo will be created. This table will contain the structure information for the Employees table.

The following lists the syntax for the Database Analyzer commands:


 DumpTableInfo <TargetDB>, <DetailsTable>, <ObjectName>, <IsAttached>
 --------------------------------------------------------------------

   Formal Parameter   Definition
   -----------------------------

   TargetDB$          The name of the database that will receive the
                      table.

   DetailsTable$      The name of the table that will receive the
                      information.

   ObjectName$        The name of the table to report on.

   IsAttached%        True if the table being reported is an
                      Attached Table; otherwise False.

 DumpQueryInfo <TargetDB>, <SQLTable>, <DetailsTable>, <ObjectName>
 ------------------------------------------------------------------

   Formal Parameter   Definition
   -----------------------------

   TargetDB$          The name of the database that will receive
                      the table. SQLTable is the name of the table that
                      will receive the SQL representation of the
                      query.

   DetailsTable$      The name of the table that will receive the
                      detailed information of the query.

   ObjectName$        The name of the query to report on.

 DumpFormOrReport <TargetDB>, <PropsTable>, <DetailsTable>,
    <ObjectName>, <IsForm>
 ----------------------------------------------------------

   Formal Parameter   Definition
   -----------------------------

   TargetDB$          The name of the database that will receive the
                      table.

   PropsTable$        The name of the table that will receive the
                      information on the form's or report's properties.

   DetailsTable$      The name of the table that will receive the
                      detail information about the form or report.

   ObjectName$        The name of the form or report.

   IsForm%            True if reporting on a form, False if on a
                      report.

 DumpMacroInfo <TargetDB>, <DetailsTable>, <ObjectName>
 ------------------------------------------------------

   Formal Parameter   Definition
   -----------------------------

   TargetDB$          The name of the database that will receive the
                      table.

   DetailsTable$      The name of the table that will receive the
                      information.

   ObjectName$        The name of the macro to report on.

 DumpModuleInfo <TargetDB>, <ProcsTable>, <VarsTable>, <ObjectName>
 ------------------------------------------------------------------

   Formal Parameter   Definition
   -----------------------------

   TargetDB$          The name of the database that will receive the
                      table.

   ProcsTable$        The name of the table that will receive the
                      listing of procedures.

   VarsTable$         The name of the table that will receive the
                      listing of variables.

   ObjectName$        The name of the module to report on.

   NOTE: DumpModuleInfo will not work if it is run from an Immediate
   window. 


Keywords          : kbprg 
Version           : 1.0 1.1
Platform          : WINDOWS 
Issue type        : kbinfo 

Last Reviewed: March 9, 1999