Is this approach folly? FoxPro, Access intermingling
In my application, I will have tables originating from and periodically updated (serveral times daily) using existing FoxPro application data, alongside tables created and managed within Access. I.e. through a series of ODBC links and queries, I'm bringing the FoxPro data into Access as resident data. There are other related data in the application, but the primary data of interest in the application are the data that come from the FoxPro app.
The data originating from Access is supplemental data, entered via forms in Access and stored in tables that have relationships to the tables that originally came from FoxPro.
I'm wondering how best to handle the updates or the "sync" process?
On the one hand, I can setup the relationships between the tables that originated from FoxPro and the tables that originate from Access (thereby using the relational db as it should be used), HOWEVER, to me that means that I would have to carefully 'sync' the resident tables that store the FoxPro app data; such as roughly, step 1: run an append query to add the new records, step 2: run a delete query to remove the deleted records, and then step 3: run an update query for each of the records in the FoxPro related tables. This amounts to lots of slow running queries.
On the other hand, I can essentially delete the FoxPro data that resides in Access and then append the new FoxPro data. To me, this would minimize the time it takes to "sychronize" the access tables with the FoxPro tables, HOWEVER, that means I can't set up relationships with the other tables (b/c of key violation errors etc).
I'm thinking the second approach is folly and is asking for orphan records etc...trouble. Thoughts? But the first approach is almost unacceptably slow (up to 20 mins)
Can someone suggest a way to setup a "sync" procedure that also maintains referential integrity.
Thanks - Noel
In my application, I will have tables originating from and periodically updated (serveral times daily) using existing FoxPro application data, alongside tables created and managed within Access. I.e. through a series of ODBC links and queries, I'm bringing the FoxPro data into Access as resident data. There are other related data in the application, but the primary data of interest in the application are the data that come from the FoxPro app.
The data originating from Access is supplemental data, entered via forms in Access and stored in tables that have relationships to the tables that originally came from FoxPro.
I'm wondering how best to handle the updates or the "sync" process?
On the one hand, I can setup the relationships between the tables that originated from FoxPro and the tables that originate from Access (thereby using the relational db as it should be used), HOWEVER, to me that means that I would have to carefully 'sync' the resident tables that store the FoxPro app data; such as roughly, step 1: run an append query to add the new records, step 2: run a delete query to remove the deleted records, and then step 3: run an update query for each of the records in the FoxPro related tables. This amounts to lots of slow running queries.
On the other hand, I can essentially delete the FoxPro data that resides in Access and then append the new FoxPro data. To me, this would minimize the time it takes to "sychronize" the access tables with the FoxPro tables, HOWEVER, that means I can't set up relationships with the other tables (b/c of key violation errors etc).
I'm thinking the second approach is folly and is asking for orphan records etc...trouble. Thoughts? But the first approach is almost unacceptably slow (up to 20 mins)
Can someone suggest a way to setup a "sync" procedure that also maintains referential integrity.
Thanks - Noel
Last edited: