best approach for new versions of application

M

Mark Andrews

Just looking for advice on this situation:

- I develop an Access application front-end and back-end (version 1.0)
- Two months later I add to that application which requires changes in
front-end and back-end
(new tables, new fields in existing tables and new fuinctionality) (version
2.0)

What is the best approach to make it so the end-user can:
- install version 2.0 and have the version 1.0 back-end data move to version
2.0 format?

Assume that multiple users at multiple locations have installed version 1.0.

Thanks in advance,
Mark
 
D

Damon Heron

First, you need some method of determining which version of the app the user
has, and test at startup.
I use a version table that has the current version stored in the user's BE.
("V2.0")
Then your code would test for, first the existence of the table, and then
the current version.
If table doesn't exist, create one with TableDef, and insert new version.
Then, for your other new tables, also use TableDef, and for new fields in
existing tables, the same:

like this: "tdf.Fields.Append tdf.CreateField("Comment", dbText, 255)"
I use DAO for this, whatever you are most comfortable with.
All the code would be in your frontend - no backend sent to users.
If you need more details, please post back.

Damon
 
M

Mark Andrews

Damon,

Thanks a few questions:

So in general:
- new front-end is sent out and detects version of back-end and adds new
fields and tables to
existing back-end with default data. Hopefully we don't delete too many
fields as we move to newer versions or change relationships drastically.

Do you programically add in new relationships in the back-end?

do you put the check to see whether you need to convert right in the normal
startup steps on the front-end?
Example: At startup my app:
1. shows a splash screen
2. hides database window or nav pane
3. relinks tables if necessary
4.opens main form of application

So add step 3A to check whether you need to convert/upgrade back-end and if
so it does the conversion?
or is it more of a user triggered event to upgrade?

Also I guess you need logic from every older version to current version?
1 to 3, 2 to 3, 2.1 to 3, 2.2 to 3 etc... (if rolling out version3).

Thanks for your help,
Mark
 
D

Damon Heron

Relationships are easiest with SQL code. Look in help for- How to: Define
Relationships Between Tables Using Access SQL
Step 3A is the way I do it, but you can have the user do it - its a matter
of personal choice, however you would need to be aware of a user who
procrastinates - then if Version 2 is skipped and the user receives Version
4, the code gets a bit more complicated to make sure the tables that were
created in Version 2 are also created when needed for this lazy user's app.
In any event, I would test for this and use the good old Select Case routine
to only update that which is required.:)

Of course, this all goes back to a really good table design at the beginning
of your first version. Less messing with the backend, the better, in my
opinion. I have an application that has been in use since 2004, and I have
only had to update tables once, thru dozens of frontend updates.

Damon
 
M

Mark Andrews

Thanks for all your input!

Mark

Damon Heron said:
Relationships are easiest with SQL code. Look in help for- How to: Define
Relationships Between Tables Using Access SQL
Step 3A is the way I do it, but you can have the user do it - its a matter
of personal choice, however you would need to be aware of a user who
procrastinates - then if Version 2 is skipped and the user receives
Version 4, the code gets a bit more complicated to make sure the tables
that were created in Version 2 are also created when needed for this lazy
user's app. In any event, I would test for this and use the good old
Select Case routine to only update that which is required.:)

Of course, this all goes back to a really good table design at the
beginning of your first version. Less messing with the backend, the
better, in my opinion. I have an application that has been in use since
2004, and I have only had to update tables once, thru dozens of frontend
updates.

Damon
 
M

Mark Andrews

Peter,

Awesome! I'll look at this code a little closer, it looks like it will help
me out very much.

Thanks,
Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top