|
-
February 3rd, 2000, 11:20 AM
#1
Updating an Access table with a table from another database
I'm trying to update a table using Access 97 and VB5 with an identical table in another database that contains changes- changes within the records, addtions & deletions of records. The update works as longs as there were no deletions or additions. The old table can't be replaced because of existing relationships. If the old table is deleted other information in different tables will also be deleted. Database replication is really not an option. Thanks.
-
February 3rd, 2000, 01:26 PM
#2
Re: Updating an Access table with a table from another database
the only suggestion i have would be to have two routines:
the first routine would act as if the table with the changes is the "master". Then you could loop through all the records from the master and see if they are in the slave. if they are - update, if not - add it. then switch the relationship. the second routine would then take the slave from the first routine and make it the master. loop through the records and see if they exist in the now slave table. if they do - dont do anything, if they dont - then delete that row because that row was deleted from the table that holds all the changes.
btw - this idea would only work if the tables have identical ID fields, which i hope i can assume since the tables are identical.
hope this helps,
John
John Pirkey
MCSD
www.ShallowWaterSystems.com
John Pirkey
MCSD (VB6)
http://www.stlvbug.org
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|