Click here to Skip to main content
Licence 
First Posted 9 Oct 2006
Views 22,174
Bookmarked 19 times

Database Script Generator

By | 9 Oct 2006 | Article
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
 
Part of The SQL Zone sponsored by
See Also

Sample Image - DatabaseScripting.jpg

Introduction

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.

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.

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 :-)

Also, currently this utility only generates scripts\XML for data changes and not the schema changes.

Steps to use:

  1. Launch the application
  2. Specify the old and new databases
  3. Select 'Scripting Options' i.e. whether you want to generate SQL scripts and\or XML file
  4. Select the changes you need to consider i.e. rows inserted\deleted\updated
  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)
  6. The output files will be generated in the same folder as DatabaseScriptGenerator.exe

License

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

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
-- There are no messages in this forum --
Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120517.1 | Last Updated 10 Oct 2006
Article Copyright 2006 by Ajey Dudhe
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid