Generic coding

J

John

Hi

I have two identical databases A & B with several tables. Each table has an
ID and a timestamp. Is it possible to write a generic procedure that will
take the table name (as it is same in both dbs) and the names of the two dbs
and update tables in db A from corresponding tables in db B depending on
which record is most recent? I am just trying to avoid writing code for each
of the tables.

Thanks

Regards
 
M

Marty

In the DB with table A, link table B from the B DB. You
need not worry that the table names are the same because
Access automatically changes the newly linked table name
to TABLENAME1. Then you can do a simple update query to
update table A. This will take little time and no code.
If you're doing this often however, you may want to
create a macro that will update the link and run the
update query every time you open the DB. If you call the
macro AutoExec it will run automatically when you start
the DB.

If you're unfamiliar with how to create the update query
please write back.

HTH
Marty
 
A

Alex Dybenko

i think you can do this by constructing several SQLs to update/delete/append
records, depending on passed table name. also you can try to use access
replication for this
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top