Ron,
I have an FM 9 system for a local school that tracks student behavior
through merits and demerits. The Db system has gone through several
revisions. The basic table structure has evolved. In some cases I
have added new fields and in others added tables.
My solution for upgrading and bringing the data across is to create a
set of scripts that dumps all data for each table to a spread sheet and
then imports the spread sheet into the new version. As part of this I
create layouts for each table that shows all fields. The scripts uses
these layouts, and the show all records before doing the save. The
catch if there is one is that you have to update these layouts as your
Database evolves and that there is an extra bit of testing to be sure
that the new version will update correctly.
I used the spread sheet so that I could easily look at the data and
visually check the integrity. For the upgrades I clone the new version
so that the files exist but no data. Then run the import script. The
script open each layouts and import the data. In this case I have it
add records.
The school has another system that tracks students and parent
information. They update the data manually in the other system and then
export the updated data as a spread sheet. I have an update script
similar to the full data import script that updates the student records
by matching the student ID. It can also add new students adding any
records that don't have a match on the ID.
These are all standard options in FM8 - 9. The real key was to include
the field names as the first line in the spreadsheet. When importing
the existing data I have it match column headings. So everything lines
up. You can also use XML or comma delimited files. XML will also do the
column headings. I found the spread sheets to be the easiest so far.
If the tables are very large either in the number of fields or in the
number of records you may want to consider XML.
You can also import directly from FM files and a number of other
sources. I haven't experimented with scripting these solutions.
Bruce
Ron wrote:
My reading and various forum messages tells me that I should not have a
separate data and program components.
Then how do I implement a revised database, and get the current data?
The only thing I can think of is to write a complete Import script to import
all of the files from the current database into my new one.
Is there another method?
Surely everybody runs into this.
Thanks!
Ron