accessNator
Registered User.
- Local time
- Today, 06:28
- Joined
- Oct 17, 2008
- Messages
- 132
I have a CompanyList table that exist on my local database and on a remote SQL Server database
This table has the following columns:
CompListRefID,CompanyName , State
I created a query which compares what records that have been added in the local vs the remote table.
What I want to do is any records that exist locally that do not exist in the remote table, insert those records as a new record in the remote table. For each new record in the remote table, I need to retrieve the AutoNumber ID of the CompListRefID field.
Also in the REMOTE database, I have another table called CompanyType which consists of the following columns:
CompanyTypeRefID, FK_CompListRefID, TypeID
When records are inserted in the REMOTE table CompanyList, I retrieve the CompListRefID and insert that ID as part of new record in the CompanyType table in the column FK_CompListRefID and also pass a numeric variable to the TypeID as well.
All this is working. I am using DAO to do this.
Basically, I am looping through each record locally, then going out to the remote DB and insert a new record remotely, pull the auto id and insert another record in another table.
In my test run, with 25 records, it does take approx 25 seconds. Way to long. I was wondering if anyone had another suggestion on how to do this?
Thanks in advance,
Chuck
This table has the following columns:
CompListRefID,CompanyName , State
I created a query which compares what records that have been added in the local vs the remote table.
What I want to do is any records that exist locally that do not exist in the remote table, insert those records as a new record in the remote table. For each new record in the remote table, I need to retrieve the AutoNumber ID of the CompListRefID field.
Also in the REMOTE database, I have another table called CompanyType which consists of the following columns:
CompanyTypeRefID, FK_CompListRefID, TypeID
When records are inserted in the REMOTE table CompanyList, I retrieve the CompListRefID and insert that ID as part of new record in the CompanyType table in the column FK_CompListRefID and also pass a numeric variable to the TypeID as well.
All this is working. I am using DAO to do this.
Basically, I am looping through each record locally, then going out to the remote DB and insert a new record remotely, pull the auto id and insert another record in another table.
In my test run, with 25 records, it does take approx 25 seconds. Way to long. I was wondering if anyone had another suggestion on how to do this?
Thanks in advance,
Chuck