Bear with me while I describe my problem. And if you read all this, boy, you have my appreciation.
I have 2 Access 2K databases, I will call Access 1 and Access 2. Both are split, both are replicated (front end only).
I need to insert or update data that is in Access (backend)1 to Access (backend) 2, and update (not insert) data that is in Access 2 to Access 1.
I have a VB program on a 3 minute timer. I scrape Access 1 looking for flagged records. I then use ADO in the VB program to query Access 1, scoop up records that are flagged (these would consist of related records in 5 tables), then insert or update them to Access 2. Then I reverse the procedure and update Access 1 for records that are flagged in Access 2.
The idea is that as concurent users are in each db, as they do their daily tasks, I am always scrapping each db to populate the other so that data remains accurate between the 2
I know this is funky, but I am doing as I am told and need help. The idea is that ALL data in Access 1 should be accurate and up to date in Access 2 every 3 minutes, and vice versa.
I must use this system, or go to a shared back end between the 2 which causes a massive slow down and too many concurrent users. And no, I cannot go to SQL server for reasons out of my reach.
If I set flags in Access 1, close all forms, open Access 2 with all forms closed, the run the VB program manually, it works perfect (I am using ADO 2.5 with begintrans, committrans, etc., but not updadatebacth - I update one record at a time, then do committrans) After the program ends, I can see current data in Access 2. Then, if I set flags in Access 2 and run the VB program, once it ends, I can see accurate data in Access 1 that was just in Access 2.
The probelm is when i run the timer, and then play with each dtabase. As I open and close forms and manipulate data, and as the timer program runs, I am of course constantly updating and inserting into 2 Access backends, each from within Access as a user would do. However, during the updates and such in each backend, data is getting totally hosed as it seems that once ADO locks onto a table or tables, any data that is currently being written to the tables by the users is thrown away. ADO always seem to win, and the Access db that is trying to write to its own table at the time ADO is involved loses.
Lord, if this makes sense to anyone, please help this ADO novice.
Is is possible (and how would it be, if you know) to have ADO talking to Access, while simultaneously having Access write to its own tables? Would recset.UpdateBatch in the VB program help? Is there anything I can do that will allow this system to work? Am I WAY off base?
Thanks for reading this short novel...
JBG
I have 2 Access 2K databases, I will call Access 1 and Access 2. Both are split, both are replicated (front end only).
I need to insert or update data that is in Access (backend)1 to Access (backend) 2, and update (not insert) data that is in Access 2 to Access 1.
I have a VB program on a 3 minute timer. I scrape Access 1 looking for flagged records. I then use ADO in the VB program to query Access 1, scoop up records that are flagged (these would consist of related records in 5 tables), then insert or update them to Access 2. Then I reverse the procedure and update Access 1 for records that are flagged in Access 2.
The idea is that as concurent users are in each db, as they do their daily tasks, I am always scrapping each db to populate the other so that data remains accurate between the 2
I know this is funky, but I am doing as I am told and need help. The idea is that ALL data in Access 1 should be accurate and up to date in Access 2 every 3 minutes, and vice versa.
I must use this system, or go to a shared back end between the 2 which causes a massive slow down and too many concurrent users. And no, I cannot go to SQL server for reasons out of my reach.
If I set flags in Access 1, close all forms, open Access 2 with all forms closed, the run the VB program manually, it works perfect (I am using ADO 2.5 with begintrans, committrans, etc., but not updadatebacth - I update one record at a time, then do committrans) After the program ends, I can see current data in Access 2. Then, if I set flags in Access 2 and run the VB program, once it ends, I can see accurate data in Access 1 that was just in Access 2.
The probelm is when i run the timer, and then play with each dtabase. As I open and close forms and manipulate data, and as the timer program runs, I am of course constantly updating and inserting into 2 Access backends, each from within Access as a user would do. However, during the updates and such in each backend, data is getting totally hosed as it seems that once ADO locks onto a table or tables, any data that is currently being written to the tables by the users is thrown away. ADO always seem to win, and the Access db that is trying to write to its own table at the time ADO is involved loses.
Lord, if this makes sense to anyone, please help this ADO novice.
Is is possible (and how would it be, if you know) to have ADO talking to Access, while simultaneously having Access write to its own tables? Would recset.UpdateBatch in the VB program help? Is there anything I can do that will allow this system to work? Am I WAY off base?
Thanks for reading this short novel...
JBG