Note that there are some explanatory texts on larger screens.

plurals
  1. POExtracting Source Code from an MS Access DB
    primarykey
    data
    text
    <p>I have an Access DB that I would like to extract the source code from so I can put it into Source control. </p> <p>I have tried to extract the data using the Primary Interop Assemblies(PIA), but I am getting issues as it is not picking up all of the modules and forms. </p> <p>There are 140 Forms and Modules in the code(Don't ask, it's a legacy system I have inherited) but the PIA code is only picking up 91 of them. </p> <p>Here is the code I am using. </p> <pre><code>using System; using Microsoft.Office.Interop.Access; namespace GetAccesSourceFiles { class Program { static void Main(string[] args) { ApplicationClass appClass = new ApplicationClass(); try { appClass.OpenCurrentDatabase("C:\\svn\\projects\\db.mdb",false,""); Console.WriteLine(appClass.Version); Console.WriteLine(appClass.Modules.Count.ToString()); Console.WriteLine(appClass.Modules.Parent.ToString()); int NumOfLines = 0; for (int i = 0; i &lt; appClass.Modules.Count; i++) { Console.WriteLine(appClass.Modules[i].Name + " : " + appClass.Modules[i].CountOfLines); NumOfLines += appClass.Modules[i].CountOfLines; } Console.WriteLine("Number of Lines : " + NumOfLines); Console.ReadKey(); } catch(Exception ex) { Console.WriteLine(ex.Message + "\r\n" +ex.StackTrace); } finally { appClass.CloseCurrentDatabase(); appClass.Quit(AcQuitOption.acQuitSaveNone); } } } } </code></pre> <p>Any suggestions on what that code might be missing? or on a product/tool out there that will do this for me?</p> <p>Edit: I should also mention that this needs to script to disk, integration with VSS is not an option as our source system is SVN. Thanks.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload