Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Automatically update database defintion

Automatically update database defintion

Scheduled Pinned Locked Moved Database
databaseannouncementquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    polishprogrammer
    wrote on last edited by
    #1

    I have some software that relies on an MS Access database, both to supply the parameters for various tests and to store the results of those tests. This software is rapidly undergoing revision, however, and each new revision often has a change in the defintion of the database that is supplied with the software. For current customers, I want to be able to supply the update without losing any of their existing data. Typically, I do not delete fields from tables, or tables from the database (nor do I change names of fields or tables), so all changes are additions, necessary additions as the scope of the program changes. Now, I can "hard code" in the creation of tables or addition of fields to each new revision, but I'd rather have some automated method of creating tables and adding fields, as needed. Right now, I can detect and respond to a new version of the software, but I'm seeking the most efficient response to the version change. Here is my idea, along with some questions. 1) Get number of tables in newer version of database and compare to previous version-add tables as needed Is there a SQL command that will return the data table count? 2) Scan through each table to detect if there are any changes in the table definition for each table...add fields, as needed Any suggestions would be appreciated.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups