This is a request for advice rather than a technical question.
I have a working Access application, and am in the process of developing this in Five. I already have all required tables, but when it comes time to import live data from the Access application, I need to make sure it is being done properly. This includes all “main” tables and also join tables. Almost all tables have a GUID primary key.
Here is what I think needs to be done:
- Add an OldCode integer field to “main” tables in Five
- Add OldKey1 and OldKey2 fields to the join tables.
- Clear all “main” tables and join tables
- Export the “main” tables in Access by querying their data into Excel, adding the OldCode value from the auto-incrementing primary key in Access
- Import all “main” table data (obviously creating new GUID key)
- Repeat for join tables, omitting the 2 foreign key values (temporarily remove the required flag for those), and filling in OldKey1 and OldKey2 with those values.
- Write queries to update the join tables using joins with “main” tables to get their OldKeyValues, and replacing the foreign keys fields with the new GUID from the “main” tables.
I believe step 3 can be done by going into tables, selecting one, then clicking + to add a table, but instead let it redefine the selected table. Please verify.
Thanks in advance for any advice.