Click here to Skip to main content
12,897,124 members (47,001 online)
Click here to Skip to main content
Add your own
alternative version


19 bookmarked
Posted 9 Oct 2006

Database Script Generator

, 9 Oct 2006
Rate this:
Please Sign up or sign in to vote.
This utility can be used to compare two MS Access databases for changes in the data. You have the option of generating the SQL scripts and\or a summary XML
<!-- Article Starts - DO NOT ADD HTML/BODY START TAGS-->

Sample Image - DatabaseScripting.jpg


I created this utility for quickly generating the SQL scripts for the changes made to the database. Afterwards, I also added the option to generate the XML which can then be consumed by any application.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p>

Mostly we use Access databases for storing the configuration or other information. I came across such situation where I had to change the database. Then to keep track of the changes we use the SQL scripts. To speed up the process I created this utility.<o:p>

Since, I had not used C# before; I developed this utility using C#. So, you may find many issues with the code. But at the end it serves the purpose :-)<o:p>

Also, currently this utility only generates scripts\XML for data changes and not the schema changes.<o:p>

Steps to use:<o:p>

  1. Launch the application <o:p>
  2. Specify the old and new databases <o:p>
  3. Select 'Scripting Options' i.e. whether you want to generate SQL scripts and\or XML file <o:p>
  4. Select the changes you need to consider i.e. rows inserted\deleted\updated <o:p>
  5. In case some tables don't have primary keys you can specify the fields that will uniquely identify the rows using PrimaryKeys.xml. This must be in the same folder as the DatabaseScriptGenerator.exe. (The template is included in the src) <o:p>
  6. The output files will be generated in the same folder as DatabaseScriptGenerator.exe<o:p>


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Ajey Dudhe
India India
No Biography provided

You may also be interested in...

Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170424.1 | Last Updated 10 Oct 2006
Article Copyright 2006 by Ajey Dudhe
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid