dcsimg
Results 1 to 2 of 2

Thread: Versioning Problem - How to Alter Data using referance database.

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2002
    Posts
    164

    Versioning Problem - How to Alter Data using referance database.

    Hi All
    I have an VB6 app with ms sql server backend.
    App is installed on many client systems.
    I keep making changes in app and maintain a version number in Projects->Properties menu of VB6 ide.
    App update procedure is , I send the new exe file to client which he downloads it in c:\update folder.
    Whenever he runs the app from App working folder, app exe checks if the updated version is available in c:\update folder.
    If available, it get copied into app working folder.
    This logic is working fine.

    But I have a problem with database alteration.
    Update may require few new fields in some tables or few new tables too.
    I can not have a hard coded alter query as client may have any previous version of app from where is updating.
    So for few clients, it may be updating from version 1.3.0 to 1.4.0 and others may be from 1.1.0 to 1.4.0
    Solution what I thought is
    1>With new update exe, when it runs first time, it will create a ref database with all tables.
    2>It will compare the ref database with actual database, table by table and field by field.
    3>If table does not available, will create one.
    4>If field not avaialable, will create one.

    5>Stored procs will be deleted and created by executing .sql file supplied with new update.

    But i find this method tedious and slow to execute.
    Can some one tell me if any alternatives available for this.
    Thanks
    Radhesham

  2. #2
    Fanatic Member kaffenils's Avatar
    Join Date
    Apr 2004
    Location
    Norway
    Posts
    946

    Re: Versioning Problem - How to Alter Data using referance database.

    If this is a commercial product I would assume that you can spend some money to buy such a product? If so, you should take a look at DB Ghost Packager Plus™. It's quite expensive, 1995$, but if you start to develop something yourself you will soon find that you spend time worth more than 1995$.

    The basics behinds DBGhost Packager Plus is that it generates .sql scripts for each object in your database. These scripts are then merged into an application that your customers can run. The application will then create a new temporary database on the customers sql server and compare and apply any differences with the actual database.

    You could of course start developing something like this yourself, but there are SOOOOO many things you need to take into cosiderations. E.g. if you change a scalar function that is used as a default value for a column in a table. This action requires that the defaults are dropped, the function altered, and the defaults recreated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width