Way to tell if table has changed?

D

Dorian

Every day we import a table from a separate Access database. I wondered if
there is some system table that keeps track of when tables have been updated,
so we could bypass importing it if nothing has changed? I'd guess the table
only changes every 2-3 days.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
J

Jeff Boyce

Dorian

I'm having trouble visualizing your situation.

If you haven't imported the table yet, how would you or Access know if it
had "been updated"?

Or are you saying you have two Access databases, an original and a
destination? ... and that you want not to bother trying to import from the
{original} db into {destination} db if the table has not been updated in
{original}?

If you actually do have two Access databases, what about the idea of linking
from one to the other, so ALL the data appears in one of them? Then you
could make your comparisons without having to do ANY importing.

JOPO (just one person's opinion)


Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
P

pietlinden

Every day we import a table from a separate Access database. I wondered if
there is some system table that keeps track of when tables have been updated,
so we could bypass importing it if nothing has changed? I'd guess the table
only changes every 2-3 days.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".

I don't think so... if there is, I don't know of it (doesn't mean it
doesn't exist somewhere).

You could create a table that stored information about when a table
was last updated via an import... Just use Allen Browne's code for
using CurrentDB.Execute <ActionSQL> If the .RecordsAffected property
is >0, then something has happened, and you can grab the date stamp
using NOW(), and write it to your table. (Say when you're inserting a
record). Maybe Allen's Audit Trail stuff will help...
 
D

De Jager

Dorian said:
Every day we import a table from a separate Access database. I wondered if
there is some system table that keeps track of when tables have been
updated,
so we could bypass importing it if nothing has changed? I'd guess the
table
only changes every 2-3 days.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and
they
eat for a lifetime".
 

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