Subject Question regarding ability to branch execution of script depending on a value in database
Author Adrian Wreyford
Let me explain what I’m trying to do:

Test.fdb, created 20050505, with amongst others a table called version, with
two fields, version and date.
Work in progress on the test.fdb

On the 20050606 I compare the test.fdb with the original one created
20050505, and generate a script to bring the old test.fdb up to date with
the new test.fdb.
This works well.

Now work in progress continues.

On the 20050706 I compare test.fdb with the updated test.fdb updated on the
20050606, and generate a script to bring the old 20050606 test.fdb inline
with the new structure.
I run the script this works well.

Now in real life my customers don’t always update at the same time.

So when the last script is available, I still have someone with a version
20050505 database, trying to apply the 20050706 script which obviously does
not have the desired effect.

This is what prompted me to add the Version table with Version and Date

Now I want to know?

Is it possible to test the version of the table in a script, and then branch
the script as one would do programmatically say for example:

Connect …
If Version.Date = '20050505' then
Run script for update 20050505to20050606
Run script for update 20050606to20050706
If Vesion.Date = 20050706 then
Run script for 20050606to20050706

This way I have one script that can bring the databases out in the field up
to date irrespective of the version.

Well I hope I have properly explained what I wish to achieve.

Thanks in advance


No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.0/103 - Release Date: 2005/09/15